Failed to load resource: The network connection was lost errors


(Nic Hubbard) #1

Recently we have been getting a lot of "Failed to load resource: The network connection was lost." errors in the console.

 

Screen%20Shot%202014-08-13%20at%203.41.2

 

This is happening for Asset Map Requests, JS API Requests and even Simple Edit and obviously stops execution of whatever we are doing. Many times it is an ajax request as in the case of the JS API or Asset Map.

 

What could be causing something like this? Very frustrating problem.

 

 

Matrix 5.0.1.1

OSX 10.10

Safari 8.0


(Talk) #2

Hi Nic, recently we had similar issues when making SOAP requests and even just loading resources like script files and stylesheets. Our server team suggested that it was a cap on the amount of queries or connections that could be executed at once in our database. I'm not sure if they implemented their suggested fix of upping the limit, but the problem seems to have gone away in recent weeks. No idea if it's related to your problem, but it might be worth a look

 

Jeremy


(Nic Hubbard) #3

Hi Nic, recently we had similar issues when making SOAP requests and even just loading resources like script files and stylesheets. Our server team suggested that it was a cap on the amount of queries or connections that could be executed at once in our database. I'm not sure if they implemented their suggested fix of upping the limit, but the problem seems to have gone away in recent weeks. No idea if it's related to your problem, but it might be worth a look

 

Hmmm, possibly. I don't handle our server stuff, so I would have to ask our IT Department. 

 

Does anyone at Squiz have experience with this issue?


(Talk) #4

Hope you find the cause. Just out of curiosity, are you using an Oracle db?


(Nic Hubbard) #5

Hope you find the cause. Just out of curiosity, are you using an Oracle db?

 

No, Postgres.


(Benjamin Pearson) #6

 

Hmmm, possibly. I don't handle our server stuff, so I would have to ask our IT Department. 

 

Does anyone at Squiz have experience with this issue?

Not directly, but some ideas...

  1. Check the logs in the Matrix system for obvious errors (maybe incorrect file permissions, PHP errors etc. Also check the Matrix error log as well as the web server/database logs under /var/log/)
  2. If there is a proxy sitting between you and the Matrix system, try without.
  3. Check headers for mistakes (unlikely but just ruling it out)
  4. Try different browsers, if it is down to a specific browser it might easier(/harder) to find the solution.
  5. And lastly check for network issues ie, do you suffer from idle periods/drop outs etc.

 

Wireshark/tcpdump, Ping and traceroute can help with the network related debugging.


(Nic Hubbard) #7

Hmm, that is a lot to check... :) Thanks for the ideas!


(Micky Gough) #8

Hi Nic,

 

Two questions:

 

How quickly does it come back with this error?

 

Are you seeing any segfaults in the apache/nginx logs?


(Nic Hubbard) #9

Hi Nic,

 

Two questions:

 

How quickly does it come back with this error?

 

Are you seeing any segfaults in the apache/nginx logs?

 

Comes back with the error maybe a few seconds after it sends the request.

 

No, no segfaults. Just a not of file not found errors.


(Nic Hubbard) #10

Continuing to get this error daily. Have also seen it on other Matrix installs. Super frustrating.

 

We use Apache, but could the problem be similar to: http://nginx.org/en/docs/http/ngx_http_core_module.html#keepalive_disable


(Marcus Fong) #11

That issue seems very specific to particular browser/OS combinations, though... are you using Safari on OS X? As far as I know, we haven't had any widespread issues with HTTP keepalives reported to us.

 

If you want to try disabling keepalives to see if it makes a difference, then you can do it with the Apache directive "KeepAlive Off".


(Nic Hubbard) #12

That issue seems very specific to particular browser/OS combinations, though... are you using Safari on OS X? As far as I know, we haven't had any widespread issues with HTTP keepalives reported to us.

 

Yes, I use Safari on OSX. So, what exactly will turning off KeepAlive do?


(Marcus Fong) #13

Disabling keep-alives on the server end forces the browser to make a new TCP connection for every request it makes.

 

This is inefficient, which is why keep-alives exist in the first place, but if your browser isn't handling keep-alives properly then it does sidestep the issue.


(Nic Hubbard) #14

Disabling keep-alives on the server end forces the browser to make a new TCP connection for every request it makes.

 

This is inefficient, which is why keep-alives exist in the first place, but if your browser isn't handling keep-alives properly then it does sidestep the issue.

 

Does anyone at Squiz use Safari on OSX? I assume they must...


(Anthony Ponomarenko) #15

No we generally use Chrome. 

 

Testing is performed in all browsers, however this issue sounds like it presents itself after being in Safari for a while.


#16

Thanks for this thread guys. I had been getting this issue as well.


(Marcus Fong) #17

 

Does anyone at Squiz use Safari on OSX? I assume they must...

 

As Anthony said, it's not common at Squiz - as far as I've seen, most people used Firefox before switching to Chrome over the course of the past few years.

 

That said, I do know one colleague who favours Safari / OSX. So I asked him about it, and he said he hasn't experienced any problems similar to yours when interacting with Matrix (and he would've interacted with a lot of different Matrix systems, in different hosting environments, over the years).