Tracking memomry and cpu consumption per site

Events happening in the community are now at Drupal community events on www.drupal.org.
yazzou's picture

Hello,
I am getting very HIGH CPU (up to 100%) and memory usage by www-data. I have several sites (20) installed on my octopus instance but i am wondering wich one exactly is consuming all that resources. The only indication i have while taping "top" comand is :
user : www-data
Command php-cgi

How can i identify which one is consuming too much ?
Thanks in advance

Comments

While it is not possible to

omega8cc's picture

While it is not possible to monitor CPU usage per site for PHP, because there is no PHP process per site, you can still rather easily identify them by watching nginx access log with tail -f /var/log/nginx/access.log when there are some heavy PHP processes running. Nginx logs also the time for processing every request, so it also helps to find which site causes issues. You can also install mytop to watch SQL resources used per site (because it shows the user and database for all active connections).

BOA

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week