1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Apache graceful restarts and FastCGI - mod_fcgid: can't lock process table in pid

Discussion in 'EasyApache' started by ahostli, Mar 17, 2010.

  1. mofolo

    mofolo New Member

    Joined:
    Jan 26, 2012
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    Re: Apache graceful restarts and FastCGI - mod_fcgid: can't lock process ta

    When will cPanel integrate the bug fix?
     
  2. Duplika

    Duplika Member

    Joined:
    Feb 26, 2005
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Buenos Aires, Argentina
    Re: Apache graceful restarts and FastCGI - mod_fcgid: can't lock process ta

    If that's the case, is it safe to add the cronjob until you decide how to address this? Please confirm this.

    FastCGI is the handler adviced by CloudLinux and it would be great if it worked out of the box.
     
  3. cPanelTristan

    cPanelTristan Active Member
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,621
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    Re: Apache graceful restarts and FastCGI - mod_fcgid: can't lock process ta

    It would be safe to add the cronjob itself, but I cannot confirm when any bug will be fixed. A developer either needs to address that question or it could be sent to inquire to the ticket system bug queue (http://go.cpanel.net/bugs).

    The only thing I can comment on is the viability of using some other method to fix a potential bug, which if you proceed with using it, you'd have to take EasyApache recompiles into account, which I needed to point out to anyone considering it.
     
  4. Duplika

    Duplika Member

    Joined:
    Feb 26, 2005
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Buenos Aires, Argentina
    Re: Apache graceful restarts and FastCGI - mod_fcgid: can't lock process ta

    Can you confirm if theres a bug regarding this or if I should complete it at http://go.cpanel.net/bugs?

    I thought the cron to kill PHP procceses was harmless but Installatron recently confirmed a problem with an installation because of this.
     
  5. Duplika

    Duplika Member

    Joined:
    Feb 26, 2005
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Buenos Aires, Argentina
    Re: Apache graceful restarts and FastCGI - mod_fcgid: can't lock process ta

    I missed a previous answer, seems like the bug is already submitted (#2464286).

    I've found Optimizing FastCGI for cPanel. Any experienced server administrator could confirm that these proposed changes might allow us to delete the crontab that kills PHP procceses?
     
  6. cPanelTristan

    cPanelTristan Active Member
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,621
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    Re: Apache graceful restarts and FastCGI - mod_fcgid: can't lock process ta

    There were multiple bug reports related to this. I cannot confirm one way or the other about it being fixed, since the entire discussion has been going on for a long time and due to the numerous bug reports for multiple different issues related to FCGI and Apache graceful restarts.

    As such, please submit a ticket if you would like to ensure that it is being looked into provided you have a server exhibiting the issue where we can see it happening.
     
  7. ikillbill

    ikillbill Member

    Joined:
    Feb 18, 2008
    Messages:
    112
    Likes Received:
    0
    Trophy Points:
    16
    Re: Apache graceful restarts and FastCGI - mod_fcgid: can't lock process ta

    yes, been MONTHS again

    why this is taking so long~~~
     
  8. Duplika

    Duplika Member

    Joined:
    Feb 26, 2005
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Buenos Aires, Argentina
    Re: Apache graceful restarts and FastCGI - mod_fcgid: can't lock process ta

    This is an alternative cron proposed by Installatron to avoid causing trouble to Installatron's installations, in case it helps anyone.

    Code:
    ps -eo uid,pid,lstart,command |
        tail -n+2 |
        while read PROC_UID PROC_PID PROC_LSTART_WDAY PROC_LSTART_MONTH PROC_LSTART_DAY PROC_LSTART_TIME PROC_LSTART_YEAR PROC_COMMAND; do
            SECONDS=$[$(date +%s) - $(date -d"$PROC_LSTART_WDAY $PROC_LSTART_MONTH $PROC_LSTART_DAY $PROC_LSTART_TIME $PROC_LSTART_YEAR" +%s)]
            if  "$PROC_COMMAND" == */usr/bin/php* ; then
                if [ $PROC_UID -gt 0 -a $SECONDS -gt 600 ]; then
                    echo $PROC_PID
                fi
            fi
         done |
         xargs kill 
    
     
  9. ikillbill

    ikillbill Member

    Joined:
    Feb 18, 2008
    Messages:
    112
    Likes Received:
    0
    Trophy Points:
    16
    Re: Apache graceful restarts and FastCGI - mod_fcgid: can't lock process ta

    is this problem showing any lights of resolving?
     
  10. Quemeros

    Quemeros New Member

    Joined:
    Mar 4, 2012
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Re: Apache graceful restarts and FastCGI - mod_fcgid: can't lock process ta

    It's 99% fixed, but sometimes appears again, use this cron:
    ps auxwwwf | grep '[0-9] /usr/bin/php' | awk '{ print $2 }' | xargs kill -9 >> /dev/null 2>&1
    If you want 100% no problem, i can't help you... but cPanel Dev Team may be; make a ticket if you can reproduce the error
     
  11. Fr3DBr

    Fr3DBr New Member

    Joined:
    Apr 6, 2013
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Re: Apache graceful restarts and FastCGI - mod_fcgid: can't lock process ta

    In hope of having this fixed too :\
     
  12. Jcats

    Jcats New Member

    Joined:
    May 25, 2011
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    Any update on this?
     
  13. cPanelMichael

    cPanelMichael Well-Known Member
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    17,523
    Likes Received:
    26
    Trophy Points:
    48
    I recommend opening a support ticket if you are experiencing an issue that you feel is related to a problem with cPanel. This is an older thread with associations to several different reports.

    Thank you.
     
  14. semseoymas

    semseoymas New Member

    Joined:
    Oct 22, 2013
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    Hello:

    I did:

    - wget http://apache.rediris.es//httpd/mod_fcgid/mod_fcgid-2.3.9.tar.gz
    - untar, configure.apxs, make and make install.
    - go to httpd.conf and remove the loadmodule for fcgid, because it is already loaded at php.conf.... so saved and rebuild httpd.conf

    It seems stable...

    Do you think it is a good idea to use last stable mod_fcgid, although needing to do this every easyapache rebuild of apache?

    Why does cpanel maintain a mod_fcgid version from almost 3 years ago, like the 2.3.6 ??

    PD: I will look for that fcgid errors when graceful reloading apache.

    Thanks.

    - - - Updated - - -

    Finally, after doing some apachectl -k graceful, got one line at error_log:

    So, the last mod_fcgid does not solve this problem at all. There are client getting errors sometimes when reloading apache graceful.

    :(
     
  15. semseoymas

    semseoymas New Member

    Joined:
    Oct 22, 2013
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    Hello:

    As I am using nginx frontend, I have configured:

    And at vhosts, replaced to:

    This way, if 502 or http petition going wrong due to Apache graceful restart and fcgid being lost, the front does news tries transparently to the user...

    I am afraid this could lead to repeated POSTs or modifications at mysql, if by example a POST is being retried...

    I am studying this behaviour and if it is possible and how to solve it.... is possible to separate POST from GET, but usually GET also could do changes at mysql...

    But other problem is this one!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    Lost fcgid proccesses, are killed by cron, but the fcigdsock is already there....

    Do you think it is a good idea to cron also removing this files if they are older than!?

    Thanks.
     

Share This Page