Error 413 with Cherokee web server?

Hello everyone. I've managed to get my site set up and running successfully on a Cherokee web server. The only problem is that my analytics script (Mint) seems to be having problems when trying to submit the pageview data from the MediaWiki portion of my site. On any other section, the pageviews are calculated correctly.

This is the error returned when I put Mint into debug mode: "

413 Request Entity too large

The length of request entity exceeds the capacity limit for this server.

"

I'm assuming that this must have something to do with the long length of the URL generated by Mint. I'd really appreciate any assistance with solving this, otherwise I'd might as well go back to Apache where it works correctly at the cost of more memory usage. :(

Server details: Ubuntu 10.04 LTS

Cherokee version: Cherokee web server 0.99.39

Thanks! :)

8 Replies

Increase your Cherokee maxuploadsize configuration variable

413 means that the data sent to the webserver is more than it can handle.

414 is if the url is too long.

Thanks for the quick response. I can't seem to find any maxuploadsize setting in the admin interface or in the documentation.

The closest setting I can see would be server!sendfile_max, but I'm not sure if that's the same one you're referring to.

Thanks again! :)

I found it at

http://code.google.com/p/cherokee/issues/detail?id=379

Which was actually implemented as postmaxlen in the source

see http://svn.cherokee-project.com/diff.ph … 9&peg=2909">http://svn.cherokee-project.com/diff.php?repname=Cherokee&path=%2Fcherokee%2Ftrunk%2Fcherokee%2Fvirtual_server.c&rev=2909&peg=2909

However it appears to be undocumented, it's a vserver variable so I'd suggest trying

vserver!1!postmaxlen = some big number

If that doesn't work I suggest waiting for someone else or poking on serverfault.com (I don't think that many people here use cherokee, most use nginx if they want lightweight).

I really appreciate you taking the time to look that up. It's great to know we've got a helpful community here at Linode. :)

That didn't do the trick either, so I'm considering switching over to nginx instead. Does anyone have a reccomended method to get it all set up and remove cherokee without any downtime? (Or as little as possible.)

(Sorry for being such a Linux SSH newbie, but I'm sure you're all used to us by now. :P)

Installing nginx is pretty much as easy as following one of these

http://library.linode.com/lemp-guides/

A few caveats you should be aware of.

1) You can't have nginx and cherokee running on the same port at the same time

2) Installing nginx might uninstall cherokee if the packages are set to conflict so it may bork your installation.

Two ways I'd consider to do it with as little downtime as possible would be

1) Clone your linode, install nginx then swap ips

or

2) Install nginx on a different port, test everything is working then stop cherokee, change nginx's port and start nginx.

Thanks! I'm going to route traffic back to my shared hosting account while I work on rebuilding the server. I'll let you know how it goes. :)

I'm assuming that APC works well with nginx as well? The bulk of the site's traffic comes from a MediaWiki installation for a large video game wiki, and they recommend using APC to drastically decrease load times.

APC works by caching the compiled php code, so as long as the php process is alive it works.

So for nginx apc works with fast cgi, however each time the fcgi process dies the cache will need to be rebuilt.

I've got everything working, and I've optimized APC for my site. Thank you very much for your assistance! :D

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct