Skip to main content

Took too long to respond errors on several sites

Comments

6 comments

  • Jcats
    Can you ensure they are resolving to your server, this way you can rule out that the issue may be else where. Are the sites similar, all running WordPress for example? Use similar plugins? You can try renaming the plugins folder to anything else, and clearing any cache in the wp-content/cache/ folder then try hitting the site again, does it time out? Obviously if its not WP, that doesn't apply, but are they PHP based? If so, you can try hitting the site, then use ps aux |grep php |grep user
    find the PHP process for that user / script and run lsof -p $pid
    replace $pid with the pid # of that process. You have to run lsof before it times out, then check the output and look for any network related connections, this might help you narrow down an issue with a script trying to connect to an external resource that is down and causing the timeout.
    0
  • Diggster
    Thanks, jcats The sites are all PHP - some WordPress and some custom cms. at least 30 of the 70 sites are affected. It does not seem platform specific. The sites always time out. I also stopped the iptable service. I am a bit of a newbie - ran the commands as below - should I be running them in the site directories? root@du22 [~]# ps aux |grep php |grep user root@du22 [~]# lsof -p $pid lsof: no process ID specified lsof 4.82 latest revision: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ latest FAQ: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/FAQ latest man page: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_man usage: [-?abhlnNoOPRtUvVX] [+|-c c] [+|-d s] [+D D] [+|-f[gG]] [+|-e s] [-F [f]] [-g ] [-i ] [+|-L [l]] [+m [m]] [+|-M] [-o [o]] [-p s] [+|-r [t]] [-s [p:s]] [-S [t]] [-T [t]] [-u s] [+|-w] [-x [fl]] [--] [names] Use the ``-h'' option to get more help information. root@du22 [~]# root@du22 [~]# ps aux |grep php |grep user
    0
  • Jcats
    No so, replace user with the cPanel username example if the username is bob do: ps aux |grep php | grep bob
    this will print out all php processes, example: [root@herbert public_html]# ps aux|grep php |grep bob bob+ 1053059 0.0 0.0 280704 14108 ? S 14:17 0:00 lsphp bob+ 1054931 43.0 0.1 315416 44556 ? Rs 14:20 0:00 lsphp:/home/bob/public_html/index.php
    so in this case, I would run: lsof -p 1054931
    It will print out a bunch of stuff, but primarily look for rows that contain TCP in them which may help find the cause.
    0
  • Diggster
    I did that - at the root and received the following: root 25563 0.0 0.0 7612 804 pts/0 S+ 17:43 0:00 grep php then ran lsof -p 25563 and it came up with nothing just return to command prompt
    0
  • Jcats
    you shouldn't have php processes running as root, the process that shows is the grep command you just ran. Its best to paste the entire output including the command you ran. Make sure you are using the cPanel username of the account you are testing on in your browser. To find the cPanel username, in ssh you can type: /scripts/whoowns domain.com
    making sure to replace domain.com with the domain timing out. Then the username that shows you would replace with ps aux |grep php | grep $user
    Making sure to replace $user with the actual username from the out of the /scripts/whoowns script. Recall, you have to run the 'ps' command while your browser is trying to reach the domain, but before it times out. This might be difficult to assist with over a forum as you need a better understanding of ssh. What if you: tail -f /etc/apache2/logs/error_log
    that will tail the log file in real time with any new lines as they are being logged. So while you tail that log, reproduce the timeout issue, then check the logs for any relevant errors. You can paste them here as well.
    0
  • cPanelLauren
    Hi @Diggster What @Jcats has requested is precisely what we would have asked you to request as well so we are waiting on that output to assist you further. I should point out that if you're unsure how to perform any of those tasks you might want to contact your provider or a system administrator if your provider is unable to assist. If you don't have a system administrator you might find one here: Resources | cPanel Forums Thanks!
    0

Please sign in to leave a comment.