[Bulma] Apache consume toda la memoria

Carlos Blanquer relayito en gmail.com
Jue Ene 17 19:25:39 CET 2008


Me autocontesto.

La config que suele ir bien en este tipo de servidores es la siguiente:

Os paso la configuración relevante del apache (Apache2 + php5 +
eaccelerator es lo básico):

KeepAlive On
MaxKeepAliveRequests 10000
KeepAliveTimeout 4

//prefork
StartServers         2
MinSpareServers      5
MaxSpareServers     9
MaxClients          200
MaxRequestsPerChild  10000


On Jan 7, 2008 8:12 PM, Carlos Blanquer <relayito en gmail.com> wrote:
> Hay cierto problema que me tiene mosqueado.
> He intentado aliviar problemas de memoria, pero parece que algo sigue
> haciendo que el apache2 se coma los 2 GB de RAM + los 2 gigas de SWAP.
>
> El tema es que me cuelga la máquina.
>
> El error.log me devuelve lo siguiente:
>
> Mon Jan 07 18:00:03 2008] [notice] child pid 21484 exit signal
> Segmentation fault (11)
> [Mon Jan 07 18:00:05 2008] [notice] child pid 21521 exit signal
> Segmentation fault (11)
> [Mon Jan 07 18:00:05 2008] [notice] child pid 21731 exit signal
> Segmentation fault (11)
> [Mon Jan 07 18:00:08 2008] [notice] child pid 21530 exit signal
> Segmentation fault (11)
> [Mon Jan 07 18:00:12 2008] [notice] child pid 21487 exit signal
> Segmentation fault (11)
> [Mon Jan 07 18:00:50 2008] [notice] child pid 21781 exit signal
> Segmentation fault (11)
> [Mon Jan 07 18:00:55 2008] [notice] child pid 21450 exit signal
> Segmentation fault (11)
> [Mon Jan 07 18:01:40 2008] [notice] child pid 21792 exit signal
> Segmentation fault (11)
> [Mon Jan 07 18:02:00 2008] [notice] child pid 21466 exit signal
> Segmentation fault (11)
> [Mon Jan 07 18:02:21 2008] [notice] child pid 21527 exit signal
> Segmentation fault (11)
> [Mon Jan 07 18:06:01 2008] [notice] child pid 21600 exit signal
> Segmentation fault (11)
> [Mon Jan 07 18:06:02 2008] [notice] child pid 21614 exit signal
> Segmentation fault (11)
> [Mon Jan 07 18:06:02 2008] [notice] child pid 21637 exit signal
> Segmentation fault (11)
> [Mon Jan 07 18:06:04 2008] [notice] child pid 21831 exit signal
> Segmentation fault (11)
> [Mon Jan 07 18:06:08 2008] [notice] child pid 21502 exit signal
> Segmentation fault (11)
> [Mon Jan 07 18:06:14 2008] [notice] child pid 21457 exit signal
> Segmentation fault (11)
> [Mon Jan 07 18:06:16 2008] [notice] child pid 21541 exit signal
> Segmentation fault (11)
> [Mon Jan 07 18:06:42 2008] [notice] child pid 21703 exit signal
> Segmentation fault (11)
>
> [Mon Jan 07 18:06:16 2008] [notice] child pid 21541 exit signal
> Segmentation fault (11)
> [Mon Jan 07 18:06:42 2008] [notice] child pid 21703 exit signal
> Segmentation fault (11)
> [Mon Jan 07 18:09:03 2008] [notice] child pid 21799 exit signal
> Segmentation fault (11)
> [Mon Jan 07 18:09:05 2008] [notice] child pid 21705 exit signal
> Segmentation fault (11)
> [Mon Jan 07 18:09:58 2008] [notice] child pid 21791 exit signal
> Segmentation fault (11)
> [Mon Jan 07 18:10:25 2008] [notice] child pid 21475 exit signal
> Segmentation fault (11)
> [Mon Jan 07 18:12:26 2008] [notice] child pid 21782 exit signal
> Segmentation fault (11)
> [Mon Jan 07 18:12:26 2008] [notice] child pid 21739 exit signal
> Segmentation fault (11)
> [Mon Jan 07 18:12:54 2008] [notice] child pid 21822 exit signal
> Segmentation fault (11)
> [Mon Jan 07 18:16:13 2008] [notice] child pid 21578 exit signal
> Segmentation fault (11)
> [Mon Jan 07 18:16:15 2008] [notice] child pid 21812 exit signal
> Segmentation fault (11)
> [Mon Jan 07 18:16:19 2008] [notice] child pid 21494 exit signal
> Segmentation fault (11)
> [Mon Jan 07 18:17:14 2008] [error] [client 72.14.199.9] File does not
> exist: /htdocs
> [Mon Jan 07 18:20:21 2008] [notice] child pid 21573 exit signal
> Segmentation fault (11)
> [Mon Jan 07 18:49:44 2008] [error] (12)Cannot allocate memory: fork:
> Unable to fork new process
> [Mon Jan 07 18:49:57 2008] [error] (12)Cannot allocate memory: fork:
> Unable to fork new process
> [Mon Jan 07 18:50:10 2008] [error] (12)Cannot allocate memory: fork:
> Unable to fork new process
> [Mon Jan 07 18:50:25 2008] [error] (12)Cannot allocate memory: fork:
> Unable to fork new process
>
> Mientras, el syslog me devuelve estos errores de que se queda sin memoria:
>
> Jan  7 18:10:35 89-149-241-174 kernel: apache2 invoked oom-killer:
> gfp_mask=0x200d2, order=0, oomkilladj=0
> Jan  7 18:10:35 89-149-241-174 kernel:  [<c0152cf5>] out_of_memory+0x69/0x198
> Jan  7 18:10:35 89-149-241-174 kernel:  [<c0154267>] __alloc_pages+0x20a/0x294
> Jan  7 18:10:35 89-149-241-174 kernel:  [<f8853b00>]
> scsi_request_fn+0x2f2/0x33c [scsi_mod]
> Jan  7 18:10:35 89-149-241-174 kernel:  [<c015a512>] do_wp_page+0x278/0x579
> Jan  7 18:10:35 89-149-241-174 kernel:  [<c02a8c32>] io_schedule+0x1d/0x27
> Jan  7 18:10:35 89-149-241-174 kernel:  [<c015002f>] __lock_page+0x58/0x5e
> Jan  7 18:10:35 89-149-241-174 kernel:  [<c0164863>] swap_info_get+0x4e/0x9b
> Jan  7 18:10:35 89-149-241-174 kernel:  [<c015d89c>]
> __handle_mm_fault+0xf15/0xfed
> Jan  7 18:10:35 89-149-241-174 kernel:  [<c0175672>] link_path_walk+0xa9/0xb3
> Jan  7 18:10:35 89-149-241-174 kernel:  [<c011b42f>] do_page_fault+0x0/0x7b9
> Jan  7 18:10:35 89-149-241-174 kernel:  [<c011b7bb>] do_page_fault+0x38c/0x7b9
> Jan  7 18:10:35 89-149-241-174 kernel:  [<c017f628>] mntput_no_expire+0x11/0x6a
> Jan  7 18:10:35 89-149-241-174 kernel:  [<c011b42f>] do_page_fault+0x0/0x7b9
> Jan  7 18:10:35 89-149-241-174 kernel:  [<c02a9e7a>] error_code+0x72/0x78
> Jan  7 18:10:35 89-149-241-174 kernel:  [<c02a0000>] tpacket_rcv+0x22b/0x3a7
> Jan  7 18:10:35 89-149-241-174 kernel:  =======================
> Jan  7 18:10:35 89-149-241-174 kernel: Mem-info:
> Jan  7 18:10:35 89-149-241-174 kernel: DMA per-cpu:
> Jan  7 18:10:35 89-149-241-174 kernel: CPU    0: Hot: hi:    0, btch:
>  1 usd:   0   Cold: hi:    0, btch:   1 usd:   0
> Jan  7 18:10:35 89-149-241-174 kernel: CPU    1: Hot: hi:    0, btch:
>  1 usd:   0   Cold: hi:    0, btch:   1 usd:   0
> Jan  7 18:10:35 89-149-241-174 kernel: Normal per-cpu:
> Jan  7 18:10:35 89-149-241-174 kernel: CPU    0: Hot: hi:  186, btch:
> 31 usd:  60   Cold: hi:   62, btch:  15 usd:  32
> Jan  7 18:10:35 89-149-241-174 kernel: CPU    1: Hot: hi:  186, btch:
> 31 usd:  15   Cold: hi:   62, btch:  15 usd:  59
> Jan  7 18:10:35 89-149-241-174 kernel: HighMem per-cpu:
> Jan  7 18:10:35 89-149-241-174 kernel: CPU    0: Hot: hi:  186, btch:
> 31 usd:  30   Cold: hi:   62, btch:  15 usd:  50
> Jan  7 18:10:35 89-149-241-174 kernel: CPU    1: Hot: hi:  186, btch:
> 31 usd:   9   Cold: hi:   62, btch:  15 usd:  10
> Jan  7 18:10:35 89-149-241-174 kernel: Active:184385 inactive:298921
> dirty:0 writeback:0 unstable:0
> Jan  7 18:10:35 89-149-241-174 kernel:  free:12103 slab:4513 mapped:31
> pagetables:7919 bounce:0
> Jan  7 18:10:35 89-149-241-174 kernel: DMA free:8088kB min:68kB
> low:84kB high:100kB active:2696kB inactive:2444kB present:16256kB
> pages_scanned:1268179 all_unreclaim$
> Jan  7 18:10:35 89-149-241-174 kernel: lowmem_reserve[]: 0 873 2006
> Jan  7 18:10:35 89-149-241-174 kernel: Normal free:39944kB min:3744kB
> low:4680kB high:5616kB active:724744kB inactive:54872kB
> present:894080kB pages_scanned:5888602 $
> Jan  7 18:10:35 89-149-241-174 kernel: lowmem_reserve[]: 0 0 9067
> Jan  7 18:10:35 89-149-241-174 kernel: HighMem free:380kB min:512kB
> low:1728kB high:2944kB active:9972kB inactive:1138496kB
> present:1160656kB pages_scanned:2856905 a$
> Jan  7 18:10:35 89-149-241-174 kernel: lowmem_reserve[]: 0 0 0
> Jan  7 18:10:35 89-149-241-174 kernel: DMA: 4*4kB 1*8kB 2*16kB 1*32kB
> 1*64kB 0*128kB 1*256kB 1*512kB 1*1024kB 1*2048kB 1*4096kB = 8088kB
> Jan  7 18:10:35 89-149-241-174 kernel: Normal: 22*4kB 8*8kB 3*16kB
> 0*32kB 3*64kB 3*128kB 3*256kB 1*512kB 1*1024kB 0*2048kB 9*4096kB =
> 39944kB
> Jan  7 18:10:35 89-149-241-174 kernel: HighMem: 3*4kB 10*8kB 2*16kB
> 0*32kB 0*64kB 0*128kB 1*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB =
> 380kB
> Jan  7 18:10:35 89-149-241-174 kernel: Swap cache: add 1202268, delete
> 1202212, find 553951/623995, race 2+302
> Jan  7 18:10:35 89-149-241-174 kernel: Free swap  = 0kB
> Jan  7 18:10:35 89-149-241-174 kernel: Total swap = 2096472kB
> Jan  7 18:10:35 89-149-241-174 kernel: Free swap:            0kB
> Jan  7 18:10:35 89-149-241-174 kernel: 521824 pages of RAM
> Jan  7 18:10:35 89-149-241-174 kernel: 292448 pages of HIGHMEM
> Jan  7 18:10:35 89-149-241-174 kernel: 5092 reserved pages
> Jan  7 18:10:35 89-149-241-174 kernel: 167928 pages shared
> Jan  7 18:10:35 89-149-241-174 kernel: 56 pages swap cached
> Jan  7 18:10:35 89-149-241-174 kernel: 0 pages dirty
> Jan  7 18:10:35 89-149-241-174 kernel: 0 pages writeback
> Jan  7 18:10:35 89-149-241-174 kernel: 31 pages mapped
> Jan  7 18:10:35 89-149-241-174 kernel: 4513 pages slab
> Jan  7 18:10:35 89-149-241-174 kernel: 7919 pages pagetables
>
> ---------------------
> Os paso la configuración relevante del apache (Apache2 + php5 +
> eaccelerator es lo básico):
>
> KeepAlive On
> MaxKeepAliveRequests 2000
> KeepAliveTimeout 4
>
> //prefork
> StartServers         2
> MinSpareServers      5
> MaxSpareServers     9
> MaxClients          200
> MaxRequestsPerChild  3000
> -----------------------
>
> Es un Dual Core a 2'4 Ghz, con 2 Gigas de RAM + 2 Gigas de Swap.
>
> Alguna idea?
> Todo lo que sirve esa máquina son wordpress + wpcache y poco más.
>
>
>
> --
> Atentamente,
>               Carlos.
> -------------------------------
> Blog - http:/www.arlay.net
> LTIM Member - http://ltim.uib.es
>



-- 
Atentamente,
              Carlos.
-------------------------------
Blog - http:/www.arlay.net
LTIM Member - http://ltim.uib.es


Más información sobre la lista de distribución Bulmailing