Ongoing 'Cannot allocate memory' and 'Badrequest line' error messages from 1.3.9 server

John A. Murdie john at cs.york.ac.uk
Thu Mar 12 07:53:22 PDT 2009


> John A. Murdie wrote:
> > We're continuing to see:
> >
> > E [dd/mmm/yyyy:hh:mm:ss +0000] Unable to fork /usr/lib/cups/cgi-bin/printers.cgi - Cannot allocate memory.
> >
> > messages in our 1.3.9 cupsd error_log file. When this happens, service becomes very glitchy (lots of '404 Not Found' messages from the web interface) and the server has to be restarted - about once a week. A memory leak, I presume.
>
> What do you have MaxJobs set to?

The default as it comes = 500. The actual number of jobs at any one time is much, much, less than that. Was this default value once smaller = 100? I might expect to see a specific error message if the active jobs resident were taking too much memory.

> If you run "top", what is the resident memory size of cupsd?

A day after a restart, this is 66:

PID    USER  PR  NO   VIRT   RES  SHR S %CPU %MEM    TIME+  COMMAND
3913      root  20       0  73352      66  2924  S       7.0        3.7   6:48.25  cupsd

which seems tiny - it's in KB, is it not? I need to log this value over the course of a week or more.

> How about running cupsd in valgrind - any memory leaks there?

I'd not thought of trying that - thanks for the idea.  I have an experimental server on which I can try it before trying this on our 'production' server, though it is perhaps only because of the large(r) number of jobs that are submitted to the latter that the problem is seen at all.
....

> ______________________________________________________________________
> Michael R Sweet                        Senior Printing System Engineer

John A. Murdie





More information about the cups mailing list