HTTP 408 with apache mod_proxy setup

Questions and bug reports for Beta releases should be posted here.
Forum rules
Help us help you:
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
nunofgs
Newbie
Newbie
Posts: 4
Joined: December 26th, 2009, 11:01 pm

HTTP 408 with apache mod_proxy setup

Post by nunofgs »

Ever since I switched to the beta version I have a problem with sabnzbd + apache proxy redirect + mod_proxy.

Since I want one place to access all my webservices, I set up my apache server with mod_proxy as advised on the wiki.

Here's my apache config:

Code: Select all

<Location /sabnzbd>
	order deny,allow
	deny from all
	allow from all
	
	ProxyPass http://localhost:8123/sabnzbd
	ProxyPassReverse http://localhost:8123/sabnzbd
</Location>
This has worked fine until the day I upgraded to the beta version. Now I have intermittent loading issues.
When I try to navigate to http://server/sabnzbd, it will simply show a blank page. Viewing the html source shows an empty file (literally, 0 characters).
If I refresh 5 or 6 times, it will finally work, but only for about 20 seconds. Then I'll have to refresh multiple times again.

I checked my apache access logs and I can see that apache gives out an error HTTP 408 for each of these failed page loads.

HTTP 408 is Request Timeout.

From my google searches, the only thing I could find related to mod_proxy and http 408 is a project called CherryPy which describes exactly the problem I am having. Here is a link to the relevant ticket in their bugtracker: link.

Can anyone help me with this?

Version: 0.5.0 beta 4
OS: Ubuntu Karmic
Install-type: custom ubuntu ppa repo
Skin: Just switched to Plush (problem exists on default skin, if it helps)
Firewall Software: None
Are you using IPV6? no
Is the issue reproducible? god yes
Last edited by nunofgs on December 30th, 2009, 7:30 pm, edited 1 time in total.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: HTTP 408 with apache mod_proxy setup

Post by shypike »

It's caused by the CherryPy webserver we use.
We are using an unofficial release of it.
Their official 3.1.0 doesn't do what we need.
Their 3.2.0RC1 is (again) incompatible with 3.1.0 and the
one we are using now.
For 0.5.0 we don;t want to take the risk of upgrading to 3.2.0RC1.
We are aware that using the current CherryPy causes
the problems you mention.
Not a nice dilemma.
When we sort out the problems during development of 0.6.0,
we'll probably release an 0.5.1 to solve it.
auslander
Newbie
Newbie
Posts: 1
Joined: January 1st, 2010, 1:46 pm

Re: HTTP 408 with apache mod_proxy setup

Post by auslander »

I changed line 1047 of ./SABnzbd.py to the following:

Code: Select all

                            'tools.gzip.on' : False,
And it fixed my problem with SABnzbd+ & mod_proxy.

It looks like it might be gzip compression causing the issue.  If that's the case, i don't see much of an issue with turning page compression off in a mod-proxy environment, since the page will just be re-compressed by apache on the way out the the browser.
nunofgs
Newbie
Newbie
Posts: 4
Joined: December 26th, 2009, 11:01 pm

Re: HTTP 408 with apache mod_proxy setup

Post by nunofgs »

auslander wrote: I changed line 1047 of ./SABnzbd.py to the following:

Code: Select all

                            'tools.gzip.on' : False,
And it fixed my problem with SABnzbd+ & mod_proxy.

It looks like it might be gzip compression causing the issue.  If that's the case, i don't see much of an issue with turning page compression off in a mod-proxy environment, since the page will just be re-compressed by apache on the way out the the browser.
It worked! AWESOME. It'll do until the problem is fixed. Thanks!

EDIT: I take that back. It doesn't work, but it does seem to help. The problem occurs less frequently but is definitely still there.
Last edited by nunofgs on January 1st, 2010, 7:15 pm, edited 1 time in total.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: HTTP 408 with apache mod_proxy setup

Post by shypike »

I have patched one cherrypy file with the solution discussed in the CherryPy defect tracker.
Would you like to test this?
Just overwrite this cherrypy file in SABnzbd's sub folder: cherrypy/wsgiserver/__init__.py
nunofgs
Newbie
Newbie
Posts: 4
Joined: December 26th, 2009, 11:01 pm

Re: HTTP 408 with apache mod_proxy setup

Post by nunofgs »

FINALLY. It worked! It really worked this time. Been testing a lot and it has not failed a single time. You are a god.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: HTTP 408 with apache mod_proxy setup

Post by shypike »

Good to hear that (that it works, I mean).
This patch will be added to the next Beta.

Thanks for your testing and perseverance.
Last edited by shypike on January 6th, 2010, 9:05 am, edited 1 time in total.
ganralf
Release Testers
Release Testers
Posts: 6
Joined: August 5th, 2009, 12:49 pm

Re: HTTP 408 with apache mod_proxy setup

Post by ganralf »

WOOT!

I have been having this problem for months now, glad to see it is not just me :D

Unfortunately I run the windows version so I cannot patch my own files... bloody noob...

Anyway, looking forward to the next release.

P.S. Happy New Year all!
ganralf
Release Testers
Release Testers
Posts: 6
Joined: August 5th, 2009, 12:49 pm

Re: HTTP 408 with apache mod_proxy setup

Post by ganralf »

I have been using beta6 for two days now, not a single proxy error. (Used to get an error about once every 3rd request or so)

Thanks guys :D
Post Reply