简体   繁体   中英

How to debug “Waiting For mydomain.com” web-request getting stuck at pending state

I'm currently in the process of moving my webserver from an on-premise solution AWS EC2. I've installed an ec2 web-server with VestaCp admin panel that configures Apache & Nginx.

Everything seems to work, except a request sometimes seems to get 'stuck'. Meaning I click on a link, and instead of navigating to that link it's added to my chrome network tab in pending state, here in the picture below you can see the pending web request that was triggered by a click on an a href, and instead of navigating to it it's stuck at pending state for more than a minute! 在此处输入图片说明 While this is happening, the browser is showing a "waiting for mydomain.com" in the bottom left corner.

I've tried moving the session to be saved in memcached (instead of file), and enabled opcache, but really haven't been able to debug this properly and nail down on the problem (I just had an hunch it might have something to do with a locked file and someone waiting on the lock). I haven't been able to find something relevant in the apahce error logs. I've also tried chrome net-internals sockets view, but it doesn't seem it's being stalled. During debug I've managed to track the a href click and the Apache access log, and noticed the request doesn't reach the Apache Access log, meaning it probably gets stuck in the client (unless the access log only updates when the request finishes)

What can cause this? What are ways to debug deeper?

Had exactly the same problem, nginx gets stuck sometimes for exactly 60 seconds.

In the end the problem was solved after I added "resolver" directive to nginx. Not entirely sure about the actual mechanism that caused this problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM