Score:1

504 error and understanding PHP logs

in flag

I started getting a 504 gateway timeout error this morning. Looking at my PHP error logs I'm seeing a TON of errors at that time for one particular site on the server:

[08-Jul-2021 07:39:23] WARNING: [pool coa] child 5912, script '/srv/.../public/index.php' (request: "HEAD /index.php?u55098017845Y83713097752ga120390874027X270621384728") executing too slow (5.757430 sec), logging
[08-Jul-2021 07:39:23] WARNING: [pool coa] child 5904, script '/srv/.../public/index.php' (request: "HEAD /index.php?j152370937559R123742059028Pt17864590990v728125838656") executing too slow (5.863548 sec), logging

I have no idea what this means and have questions:

  • why does the 'request' have a long string variable after it?
  • what does [pool coa] child mean?

Additionally, when I look at my analytics traffic, I can't see any spikes so I'm unsure what's causing this.

Any suggestions on where to start?

Score:1
cn flag

This is a performance issue, and/or some timeouts that are set too low (in apache)

You could use a php profiler to figure out what is slow in PHP code: Xdebug, Xhprof, Z-Ray and Prefix.

Check also resource utilization.

Edit 1: The long string is not a variable, it is missing the equals. It is part of query string of the URL. Could be something like a session cookie, and it depends on your php application how is it used.

About php-fpm pools allows to group multiple workers that have the same config and same listener. You could use pools if you have multiple users and you want to separate the permission each pool has, and under which user is running.

When you see spikes you have to know if it is about bandwidth, number of requests, number of sessions, etc. And those spikes might not be related to performance issues.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.