I have a Node.js web server that uses express and spdy to serve RESTful API endpoints over http2. As you can see from the screenshot attached, some of my requests are getting stalled from 15 to 20 seconds and it only happens in Chrome.
The entire reason we upgraded to http2 was so that we didn't have to do domain sharding to avoid the queuing wait times. Is there any way I can overcome this? I also have the HTTP2_SESSION logs from Chrome's network-internals tool if those would be helpful.
Here's the screenshot of the absurd amount of stalled time, which is accounting for 80% of our total time:
EDIT:
The npm package is called SPDY. It still uses HTTP/2. I couldn't get Node.js' native http2 module working with express.
EDIT 2:
Paste bin link to the http2 session logs
Related
Normal js code (no service worker, but the app has a manifest with an empty service worker).
A simple timeout to an ajax call that's the code.
I close all chrome tabs, I close the process in task manager, no more chrome processes and yet I still get requests on my server. This happens locally and on the server, I know this because I can see the cookies sent and for which user id is needed.
Also I know that chrome is running the code because there is a date in the request and is updated as it go.
Triple checked that chrome is closed on all users and all processed in task manager.
Is not a coincidence because at this moment I have 2 different users (different chrome profiles) doing this. Also in my dev server there are a lot of users with the same behaviour.
I'm also not sure is chrome, but has to be, node.js alone can't change the time of the request.
Win 10 and Chrome Version 60.0.3112.90 (Official Build) (64-bit)
Terrible and I don't know what to do...
if I restart my node.js server all the requests stops.
Was my mistake! As I have server side rendering (with react) I forgot that the timeout was also run on the server side. The fix was to don't run any timeouts on the server side.
Thanks anyway for the answers. I was concerned how chrome was still running my js code even shut down, made no sense at all!
Our system uses an AWS Elastic Load Balancer.
We are encountering a maddening issue where our HTML video tags are failing to play randomly. I can't reliably reproduce the issue unless I bypass the ELB, which makes me suspect it, naturally.
I've verified that the same files are on both of our IIS servers, and I have verified that the MIME types are the same on both.
The video files are H.264 MP4s, but they will sometimes work, so I don't think it has anything to do with Chrome's support of the codec.
Anybody have an idea on what I can do, or where to look next?
This is a session issue on the AWS ELB. Enable the Sticky Sessions on the ELB and this issue will be resolved. Here is the developers guide.
http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/elb-sticky-sessions.html
I would enable full logging on both IIS and the ELBs, and carefully check the access logs on each to confirm.
You would expect to see a 200 http response code on the ELB and the IIS server for each request made. Check for any requests that result in a 400 or 500 error. You need to pair each individual request from the ELB to the IIS server and review.
See Monitor Your Load Balancer Using Elastic Load Balancing Access Logs
I am troubleshooting an issue where I believe an HTTP request is waiting an indefinite amount of time for a response. In Chromium's developer console, the Network tab does an excellent job at displaying completed traffic and events, but not current ones (that I can see).
How can I debug a lingering HTTP request using Chromium's developer console?
I have had the same issue for quite sometime. On the developer tools Network tab, I can see that all requests match the response on my server log and none is waiting. I even tried to shutdown the server while it is happening, and it still waits indefinitely.
This doesn't happen with Firefox and Opera so I'm inclined to say that it's a chrome bug.
Added: I have also noticed that when I close chrome then open it again, the issue disappears.
I am trying to get a simple web page server from within a Google Chrome Packaged App. There is already a UDP server running within the app and working without any problems.
I am starting the socket.listen on 0.0.0.0:8080 and copying most of the code from
https://github.com/GoogleChrome/chrome-app-samples/tree/master/webserver
. The same issue is replicated in the sample app.
What I am doing is accepting the request and sending a single HTML file to all requests which have some data in the request (request.data.length > 0). The flow of the app is similar to the sample app with near-equivalent functions.
To test this I am using Socket Test 3.0 (from SourceForge). Creating a socket to 127.0.0.1:8080 and sending it GET / HTTP/1.1 as the content. As intended the Chrome App responds with the html file and correct headers. I can repeat this multiple times without restarting the App. The problem arises when the App is sent a request through Chrome. On first look it works as intended, but then it Time Out on refresh. This is also replicated in the sample app.
On debugging I found that every thing was being handles. The write socket being destroyed and a socket.accept(serverSocket, ...) being issued. I also made sure that it was done inside the callback function of the socket.write. The first request as intended is for the page requested (GET / HTTP/1.1 for localhost:8080). Second was for favicon.ico as GET /favicon.ico HTTP/1.1. And then a third connection with none in data (which is then ignored and socket destroyed). Unlike in the SocketTest where every request was answered back.
I have created a video showing the screencast while reproducing the error on YouTube. Also the repo for the project that I'm working on is at GitHub.
I had the same issues with Google's sample web server. I wrote a more robust socket server app that does not hang. The source is on GitHub at https://github.com/kzahel/web-server-chrome and you can install it from the Chrome web store at https://chrome.google.com/webstore/detail/web-server-for-chrome/ofhbbkphhbklhfoeikjpcbhemlocgigb
I'm facing a problem with a 3-tier application. It uses IIS and SQL Server. And the problem is that sometimes (longer requests cause higher probability) client does not receive response from IIS. It hangs when there is no activity ON SQL Server, and when even when I kill an SQL Process I get no response with an exception. When I examine data after these hangs I find that my SQL requests have succeeded, so the problem appears to be on IIS. Unfotunately I don't have much control over the place where the application is hosted and I cannot reproduce the problem. There can be many answers to this question, but at least I need a hint in what direction I should investigate.
UPDATE: I also have an app running on the same server that does a small job: it inserts around a 100 lines line-by-line into a database. Artificially I made it run for about 10 minutes (by putting xlock on the table). After removing the xlock the process on IIS continued running and successfully inserted those 100 lines. However, control never returned to the client thereafter, it just waited indefinitely. It looks like this is a problem when returning a response to the client after a long running process.
BTW, this is not a website, but a WinForms app that uses Remoting.
If you're sure that SQL Server is returning to IIS, then you might want to check the IIS logs to see what might be happening to the request. The normal location for these logs is %SystemRoot%\system32\Logfiles\<service_name>.
If you're not sure about SQL Server, you might access the SQL logs, run Profiler, or check the Windows system logs for errors, run your site in debug in Visual Studio or add your own logging to your app to figure out which step it's hanging on.
I have finally figured out where the problem is. The application is run on a web farm and there is a balancer server between the client and IIS. There was a too small timeout on the balancer. For some reason it is not quite friendly with .net remoting and it doesn't return any timeout exceptions to the client. The issue has been solved by increasing the timeout.