• [^] # Re: Script simplifié

    Posté par . En réponse au message fuite mémoire PHP. Évalué à 0.

    Le problème c'est que en une seule requête PHP le processus apache2 utilise 54MB de mémoire,

    Donc en 10 requête, j'arrive à 100% de mémoire utilisée, ma plateforme ARM en a 512MB.

    Le paramètre MaxMemFree (http://httpd.apache.org/docs/2.2/mod/mpm_common.html#maxmemfree) semble plus adapté, je l'ai reglé à 10000 (en KB), mais ça n'a pas résolu le problème.

    Exemple de consommation mémoire après 5 requêtes PHP :

    top - 11:15:22 up 2:15, 4 users, load average: 1,50, 1,62, 1,64
    Tasks: 93 total, 1 running, 92 sleeping, 0 stopped, 0 zombie
    %Cpu(s): 4,8 us, 0,0 sy, 0,0 ni, 95,2 id, 0,0 wa, 0,0 hi, 0,0 si, 0,0 st
    KiB Mem: 500780 total, 475860 used, 24920 free, 3196 buffers
    KiB Swap: 0 total, 0 used, 0 free, 120628 cached
     PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
     5844 www-data 20 0 24360 7204 2556 S 0,0 1,4 0:00.64 apache2
     5845 www-data 20 0 24360 7296 2604 S 0,0 1,5 0:00.62 apache2
     5846 www-data 20 0 24360 6976 2480 S 0,0 1,4 0:00.10 apache2
     5847 www-data 20 0 24360 6976 2480 S 0,0 1,4 0:00.10 apache2
     5848 www-data 20 0 24376 7020 2464 S 0,0 1,4 0:00.16 apache2
     5852 www-data 20 0 72496 54m 2536 S 0,0 11,1 0:20.42 apache2
     5853 www-data 20 0 72496 54m 2536 S 0,0 11,1 0:19.03 apache2
     5858 www-data 20 0 72520 54m 2536 S 0,0 11,2 0:06.34 apache2
     5862 www-data 20 0 72528 54m 2536 S 0,0 11,2 0:08.35 apache2
     5863 www-data 20 0 72496 54m 2536 S 0,0 11,1 0:19.00 apache2