1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Plesk 9.0.0 "500 - Internal Server Error " after upgrade

Discussion in 'Plesk 9.x for Linux Issues, Fixes, How-To' started by isnoop, Jan 23, 2009.

  1. isnoop

    isnoop Guest

    I used the auto-upgrade on my server and now Plesk dies with a "500 - Internal Server Error".

    I can see the login page and submit my credentials fine. If I sign in with a normal user, there is no frameset, just a single 500 error page. If I sign in with the admin account, the left hand frame shows up, but the upper and right frames show 500 errors.

    Has anyone else had this problem or know how to fix it?
  2. isnoop

    isnoop Guest

    Hmm, it looks like my /usr/local/psa/admin/conf/httpsd.conf was deleted during the upgrade!

    Could someone post an original copy of this file?
  3. gorilych

    gorilych Guest

    plesk 9 no longer uses admin apache. check sw-cp-server configuration and logs.
  4. isnoop

    isnoop Guest

    Good tip. I'm getting the following in the sw-cp-server error log:
    [Fri Jan 23 13:19:53 2009] [apc-error] apc_mmap: mmap failed: No space left on device
    2009-01-23 13:19:53: (mod_fastcgi.c.1004) the fastcgi-backend /usr/bin/sw-engine-cgi -c /usr/local/psa/admin/conf/php.ini -d auto_prepend_file=auth.php3 -u psaadm failed to start: 
    2009-01-23 13:19:53: (mod_fastcgi.c.1008) child exited with status 2 /usr/bin/sw-engine-cgi -c /usr/local/psa/admin/conf/php.ini -d auto_prepend_file=auth.php3 -u psaadm 
    2009-01-23 13:19:53: (mod_fastcgi.c.1011) if you try do run PHP as FastCGI backend make sure you use the FastCGI enabled version.
    You can find out if it is the right one by executing 'php -v' and it should display '(cgi-fcgi)' in the output, NOT (cgi) NOR (cli)
    I haven't recompiled PHP or anything. Is there any good reason for this?
  5. gorilych

    gorilych Guest

    check this command output:

    /usr/bin/sw-engine-cgi -c /usr/local/psa/admin/conf/php.ini -d auto_prepend_file=auth.php3 -u psaadm

    and this:

    df -h
  6. isnoop

    isnoop Guest

    Thanks for the reply.
    Here's the output:
     ~ /usr/bin/sw-engine-cgi -c /usr/local/psa/admin/conf/php.ini -d auto_prepend_file=auth.php3 -u psaadm 
    [Fri Jan 23 14:54:08 2009] [apc-error] apc_mmap: mmap failed: No space left on device
     ~ df -h
    Filesystem            Size  Used Avail Use% Mounted on
    /dev/vzfs              20G   18G  1.1G  95% /
    simfs                  20G   18G  1.1G  95% /tmp
    simfs                  20G   18G  1.1G  95% /var/tmp
    With 1GB left, there shouldn't be much problem with space. The mmap issues are memory related, but I have 300+ MB free.
    That message comes up even with APC disabled. Does Plesk use its own APC instance? I'm guessing it does because my webserver APC has mmap disabled.
  7. gorilych

    gorilych Guest

    may be your container hit some limits? Check it:

    grep -v ' 0$' /proc/user_beancounters
  8. isnoop

    isnoop Guest

    Here are the contents:
    Version: 2.5                                                                   
           uid  resource           held    maxheld    barrier      limit    failcnt
         27497: kmemsize       10080988   10119734   12288832   13517715   18766810
                lockedpages           0          0        600        600          0
                privvmpages       91550      92928     172374     189611       1126
                shmpages          16372      16372      17237      17237       3122
                dummy                 0          0          0          0          0
                numproc              81         81        300        300          0
                physpages         33104      33112          0 2147483647          0
                vmguarpages           0          0      65536 2147483647          0
                oomguarpages      33113      33121      65536 2147483647          0
                numtcpsock           34         39        300        300          0
                numflock             12         16        480        528          0
                numpty                2          2         30         30          0
                numsiginfo            0          1       1024       1024          0
                tcpsndbuf        357572     379232    2867477    4096277          0
                tcprcvbuf        358212     409640    2867477    4096277          0
                othersockbuf      33096      36100    1433738    2662538          0
                dgramrcvbuf           0       2236    1433738    1433738          0
                numothersock         38         40        300        300          0
                dcachesize       784548     802218    2684271    2764800          0
                numfile            3447       3474       6300       6300          0
                dummy                 0          0          0          0          0
                dummy                 0          0          0          0          0
                dummy                 0          0          0          0          0
                numiptent            55         55        200        200          0
  9. gorilych

    gorilych Guest

    failcounters for kmemsize privvmpages shmpages are not zero.

    check if they are increasing if you run /usr/bin/sw-engine-cgi -c /usr/local/psa/admin/conf/php.ini -d auto_prepend_file=auth.php3 -u psaadm

    if it is so, you need to increase resources for container.

    mmap syscall uses shared memory pages, so increasing shmpages limit can help.
  10. isnoop

    isnoop Guest

    Aha... kmemsize and privvmpages were unchanged but shmpages incremented.

    How would I go about modifying this value? I'm familiar with changing shmmax and shmall through /etc/sysctl.conf and /proc/sys/kernel, but shmpages doesn't appear in either of these locations. In fact, it doesn't even appear as an available value with 'sysctl -a'.
  11. gorilych

    gorilych Guest

    you cannot rule container limits from inside the container.

    this can be done at hardware node level only. guess you need to contact your provider.

    or you can modify php.ini so it maps file not to physical memory but to the disk:


    please let me know if this works, its quite interesting.
  12. isnoop

    isnoop Guest

    That's good to know.
    Thank you very much for your help. I'll go see if MediaTemple is willing to bump this value up for me.
    Would doubling it suffice?
  13. gorilych

    gorilych Guest

    You can ask for doubling first and then check maxheld value in /proc/user_beancounters to see actually needed value.
  14. AlexanderJ

    AlexanderJ New Pleskian

    Oct 16, 2009
    Likes Received:
    I found that actually even though the error is caused with the container running out of memory, you can lower the PHP memory requirements for Plesk and then actually it works fine.

    cd /usr/local/psa/admin/conf/
    vi php.ini

    Then the setting you want to change is apc.shm_size from the default setting of 40 (Mb?) to 10

    apc.shm_size = 10

    And then check Plesk to see if it is working

    /usr/bin/sw-engine-cgi -c /usr/local/psa/admin/conf/php.ini -d auto_prepend_file=auth.php3 -u psaadm

    ..and with a bit of luck you should be away!

    Reference: http://www.alexjudd.com/?p=45