How to Select a Suitable Nonlinear Solver

I tried to solve the NSCH equation with a completely implicit method. and when I used the solution method in the cahn hilliard example, I got an error. I think this is because the memory required for the operation is too large. I wonder how to select a suitable nonlinear solver?
error:
interrupted by signal 9: SIGKILL

function:


Unknown variables:
c, mu, u, p
The solver I chosed:

class CahnHilliardEquation(NonlinearProblem):
    def __init__(self, a, L):
        NonlinearProblem.__init__(self)
        self.L = L
        self.a = a

    def F(self, b, x):
        assemble(self.L, tensor=b)

    def J(self, A, x):
        assemble(self.a, tensor=A)
...

L0 = c * fai * dx - c0 * fai * dx + dt * inner(inner(u, grad(c)), fai) * dx + dt * M * inner(grad(mu), grad(fai)) * dx
L1 = mu * pot * dx - df_dc * pot * dx - coef * inner(grad(c), grad(pot)) * dx
L2 = inner(u, v) * dx - \
     inner(u0, v) * dx + \
     dt * inner(grad(u) * u, v) * dx + \
     dt / rho_int_ox * inner(grad(p), v) * dx + \
     yita * dt / rho_int_ox * inner(grad(u), grad(v)) * dx + \
     dt / rho_int_ox * inner(c * grad(mu), v) * dx + \
     dt / rho_int_ox * inner(rho(c) * g, v) * dx
L3 = div(u) * q * dx
L = L0 + L1 + L2 + L3

a = derivative(L, c_mu_u_p, d_c_mu_u_p)
problem = CahnHilliardEquation(a, L)
solver = NewtonSolver()
solver.parameters["linear_solver"] = "lu"
solver.parameters["convergence_criterion"] = "incremental"
solver.parameters["relative_tolerance"] = 1e-6

mesh:
192×768 rectangles

In order to simplify the problem, only part of the code is given, and if necessary I will provide

Change the linear solver, to for instance mumps.

Thanks dokken, this modification has some effect, but newton solver seems unable to converge, do you have any good way?

*** Error:   Unable to solve nonlinear system with NewtonSolver.
*** Reason:  Newton solver did not converge because maximum number of iterations reached.
*** Where:   This error was encountered inside NewtonSolver.cpp.
*** Process: 0

There are many things you can do:

  1. start with a better initial guess to the solution of your problem.
  2. increase iteration count
  3. change solver convergence criterion
  4. change convergence tolerance
  5. allow relaxation

Which of these methods you should useDepends on the residual, which you can inspect by setting the LogLevel to undo:

set_log_level(LogLevel.INFO)