Question

Site crashed due to a possible memory allocation issue

The other day my site crashed, I followed this tutorial and when I opened the error log file I was greeted with this:

[Sun Sep 20 06:27:53.965600 2015] [mpm_prefork:notice] [pid 19095] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.9 configured -- r$

[Sun Sep 20 06:27:53.965651 2015] [core:notice] [pid 19095] AH00094: Command line: '/usr/sbin/apache2'

[crit] Memory allocation failed, aborting process.

[Sat Sep 26 01:54:31.107259 2015] [core:notice] [pid 19095] AH00051: child pid 30128 exit signal Aborted (6), possible coredump in /et$

[Sat Sep 26 02:32:21.725614 2015] [mpm_prefork:notice] [pid 19095] AH00169: caught SIGTERM, shutting down

[Sat Sep 26 02:32:22.507144 2015] [mpm_prefork:notice] [pid 30460] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.9 configured -- r$

[Sat Sep 26 02:32:22.507941 2015] [core:notice] [pid 30460] AH00094: Command line: '/usr/sbin/apache2'

[Sat Sep 26 02:49:02.616280 2015] [mpm_prefork:notice] [pid 30460] AH00169: caught SIGTERM, shutting down

[Sat Sep 26 02:49:18.401628 2015] [mpm_prefork:notice] [pid 1096] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.9 configured -- re$

[Sat Sep 26 02:49:18.404104 2015] [core:notice] [pid 1096] AH00094: Command line: '/usr/sbin/apache2'

[Sat Sep 26 02:49:40.540312 2015] [core:notice] [pid 1096] AH00051: child pid 1109 exit signal Segmentation fault (11), possible cored$

[Sat Sep 26 02:49:49.553012 2015] [mpm_prefork:notice] [pid 1096] AH00169: caught SIGTERM, shutting down

[Sat Sep 26 02:49:50.430461 2015] [mpm_prefork:notice] [pid 1392] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.9 configured -- re$

[Sat Sep 26 02:49:50.430623 2015] [core:notice] [pid 1392] AH00094: Command line: '/usr/sbin/apache2'

The first thing that jumped out at me was this line:

[crit] Memory allocation failed, aborting process.

So I ran the following command and got this result

:~# grep memory /var/log/dmesg
[    0.000000] Scanning 1 areas for low memory corruption
[    0.000000] Base memory trampoline at [ffff880000099000] 99000 size 24576
[    0.000000] init_memory_mapping: [mem 0x00000000-0x000fffff]
[    0.000000] init_memory_mapping: [mem 0x3ea00000-0x3ebfffff]
[    0.000000] init_memory_mapping: [mem 0x3c000000-0x3e9fffff]
[    0.000000] init_memory_mapping: [mem 0x00100000-0x3bffffff]
[    0.000000] init_memory_mapping: [mem 0x3ec00000-0x3fffdfff]
[    0.000000] Early memory node ranges
[    0.000000] PM: Registered nosave memory: [mem 0x0009f000-0x0009ffff]
[    0.000000] PM: Registered nosave memory: [mem 0x000a0000-0x000effff]
[    0.000000] PM: Registered nosave memory: [mem 0x000f0000-0x000fffff]
[    0.000000] please try 'cgroup_disable=memory' option if you don't want memory cgroups
[    0.012025] Initializing cgroup subsys memory
[    0.041090] Freeing SMP alternatives memory: 32K (ffffffff81e6c000 - ffffffff81e74000)
[    1.370191] Freeing initrd memory: 18780K (ffff88003ed99000 - ffff88003fff0000)
[    1.376662] Scanning for low memory corruption every 60 seconds
[    1.691925] Freeing unused kernel memory: 1332K (ffffffff81d1f000 - ffffffff81e6c000)
[    1.699187] Freeing unused kernel memory: 828K (ffff880001731000 - ffff880001800000)
[    1.704548] Freeing unused kernel memory: 700K (ffff880001b51000 - ffff880001c00000)
[    5.250658] [TTM] Zone  kernel: Available graphics memory: 508964 kiB

I have very little experience with deciphering error logs files and so I have two questions:

  • Based upon the info in the error log file would it appear that my site crashed due to a memory allocation issue?

  • I have no idea what any of the results mean after running the command

:~# grep memory /var/log/dmesg

Is there anything there that I should be concerned with?


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

When seeing this I would recommend running

free -m

To see your available memory. If you are running out of available memory it may help to create a swap file. This tutorial will guide you in the process. If you continue to encounter these problems even after creating a swap file you may need to upgrade to a larger droplet.