How can I change the connection timeout setting in Firefox?
(from superuser.com)

After the last Firefox update we had the same session timeout issue & following setting helped to resolve it.
We can control it with network.http.response.timeout parameter.

1. Open Firefox & type in 'about:config' in the address bar & press Enter.

2. Click on the 'I'll be careful, I promise' button.

3. Type 'timeout' in the search box and network.http.response.timeout parameter will be displayed.

4. Doube click on the 'network.http.response.timeout' parameter & enter the time value (it is in seconds) that you don't want your session not to timeout, in the box.