Want more timely Centmin Mod News Updates?
Become a Member

PHP-FPM PHP APC /tmp/apc missing

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by pamamolf, Aug 14, 2014.

  1. pamamolf

    pamamolf Well-Known Member

    2,498
    229
    63
    May 31, 2014
    Ratings:
    +390
    Local Time:
    1:23 AM
    Nginx-1.13.x
    MariaDB 10.1.x
    Hi

    I was try to restart the Mariadb 10 and i was got an error about missing pid file and when i check the log i go some info about Aria plugin ...

    Then i restart the server to check it and now i am getting 502 bad gateway :(

    Any ideas how can i fix it?

    I am on the stable 07 version.

    Code:
    fpmstart
    Starting php-fpm [14-Aug-2014 05:21:58] NOTICE: PHP message: PHP Fatal error:  PHP Startup: apc_mmap: mkstemp on /tmp/apc/apc.CYV5TP failed: in Unknown on line 0
    /etc/init.d/php-fpm: line 64:  6162 Segmentation fault  (core dumped) $php_fpm_BIN $php_opts
    
    Ok fixed :
    /tmp/apc/ folder was missing but how is this possible by just restarting?

    Thanks
     
    Last edited: Aug 14, 2014
  2. eva2000

    eva2000 Administrator Staff Member

    28,984
    6,579
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,766
    Local Time:
    8:23 AM
    Nginx 1.13.x
    MariaDB 5.5
    that is PHP-FPM not MariaDB issue did you reboot server before restart ? Because if your /tmp is mounted on ram disk tmpfs then it could of cleared whatever is in /tmp i.e. /tmp/apc. You should try setting apc to /tmp/apc.XXXXXX instead
     
    • Like Like x 1
  3. pamamolf

    pamamolf Well-Known Member

    2,498
    229
    63
    May 31, 2014
    Ratings:
    +390
    Local Time:
    1:23 AM
    Nginx-1.13.x
    MariaDB 10.1.x
    I am using another folder than /tmp as many times i have many thousands of files there daily and i want to avoid one folder with so many files there as it is more easy to use on another folder.....

    If i create a folder and then mount it on ram after restart the folder should exist and APC will work even if the startup command that i use to mount it again in ram after restart don't work or not?
     
  4. eva2000

    eva2000 Administrator Staff Member

    28,984
    6,579
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,766
    Local Time:
    8:23 AM
    Nginx 1.13.x
    MariaDB 5.5
    I wouldn't worry as APC is only one file and that is /tmp/apc.XXXXXX. You'd need to figure out why it's happening, you can do a verbose run of the command to restart php-fpm and see what it says

    Code:
    bash -x /etc/init.d/php-fpm restart
    But you're doing it incorrectly for load APC from ram disk read PHP: Runtime Configuration - Manual

     
  5. pamamolf

    pamamolf Well-Known Member

    2,498
    229
    63
    May 31, 2014
    Ratings:
    +390
    Local Time:
    1:23 AM
    Nginx-1.13.x
    MariaDB 10.1.x
    I didn't understand anything from the link :) noob alert...

    But i was thinking that had the cache in ram it should be faster and if i restart i will lost anyway the cache so it is not a problem to start again from zero...
     
  6. eva2000

    eva2000 Administrator Staff Member

    28,984
    6,579
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,766
    Local Time:
    8:23 AM
    Nginx 1.13.x
    MariaDB 5.5
    basically setting path as /apc.shm.XXXXXX is already using memory based caching instead of file based
     
  7. pamamolf

    pamamolf Well-Known Member

    2,498
    229
    63
    May 31, 2014
    Ratings:
    +390
    Local Time:
    1:23 AM
    Nginx-1.13.x
    MariaDB 10.1.x
    The path that i use is: /apc/apc.shm.XXXXXX
     
  8. eva2000

    eva2000 Administrator Staff Member

    28,984
    6,579
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,766
    Local Time:
    8:23 AM
    Nginx 1.13.x
    MariaDB 5.5
    I'd just leave it as /tmp/apc.shm.XXXXXX
     
  9. pamamolf

    pamamolf Well-Known Member

    2,498
    229
    63
    May 31, 2014
    Ratings:
    +390
    Local Time:
    1:23 AM
    Nginx-1.13.x
    MariaDB 10.1.x
    /tmp is already in ram with the default Centminmod installation?
     
  10. eva2000

    eva2000 Administrator Staff Member

    28,984
    6,579
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,766
    Local Time:
    8:23 AM
    Nginx 1.13.x
    MariaDB 5.5
    yes /tmp is already secured and mounted on tmpfs ram disk
     
    • Like Like x 1