-2

I have site on shared php hosting. It sometime does not response. What can me help find problem which take all memory?

Log Apache:

[Sun Jul  7 13:08:23 2013] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Mon Jul  8 00:05:24 2013] [notice] SIGUSR1 received.  Doing graceful restart
[Mon Jul  8 00:05:24 2013] [error] VirtualHost 10.1.226.100:0 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
[Mon Jul  8 00:05:24 2013] [notice] Apache/1.3.42 (Unix) PHP/5.3.13 mod_gzip/1.3.26.1a configured -- resuming normal operations
[Mon Jul  8 00:05:24 2013] [notice] Accept mutex: flock (Default: flock)
[Mon Jul  8 10:19:16 2013] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Mon Jul  8 10:19:26 2013] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Mon Jul  8 11:52:20 2013] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Mon Jul  8 13:40:52 2013] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Mon Jul  8 13:41:41 2013] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Mon Jul  8 16:23:59 2013] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Mon Jul  8 16:24:34 2013] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Mon Jul  8 16:27:01 2013] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Mon Jul  8 17:24:44 2013] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Mon Jul  8 17:36:07 2013] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Mon Jul  8 18:06:15 2013] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Mon Jul  8 20:18:01 2013] [error] (12)Cannot allocate memory: fork: Unable to fork new process
korvinko
  • 101
  • 1
  • 1
  • 4
    This question appears to be off-topic because it is nothing you can solve - you should contact your service provider. – user9517 Jul 26 '13 at 09:06

1 Answers1

2

You don't say exactly how much control you have over the server. If you have root then install atop, let it write its logs for a while, then once you've had a problem you can review the history and see which processes have consumed all memory.

Alternatively you could mitigate by adding swap space (if you have the disk space available to do so), but obviously this is only a temporary fix. Performance will be degraded significantly while the machine is swapping... although not as much as when its memory is completely exhausted!

Flup
  • 7,978
  • 2
  • 32
  • 43
  • It is shared hosting, and i did not have permission root. Which tools you can recommend? – korvinko Jul 26 '13 at 10:22
  • 2
    You could try looking at the output of `top` (or `htop`, or `atop`...) -- but if you don't have root, how will you fix the problem? – Flup Jul 26 '13 at 10:25