Bad Request while paperclip processes images
I developed a gallery where images were uploaded by ajax (jquery ajax upload), and then processed by paperclip.
Now if I'm uploading some files (say 10 for example) it takes paperclip a time to resize and copy the watermark. If a someone now (during paperclip renders the images) tries to access the website he gets an error message (Bad Request, bad URI `/502.shtml'. )
That's quite annoying... does someone has an idea how to fix this problem?
thx for response
update:
Logfile form webhoster:
[Fri Jul 08 10:31:01 2011] [error] (111)Connection refused: proxy: HTTP: attempt to connect to 127.0.0.1:12002 (127.0.0.1) failed [Fri Jul 08 10:51:41 2011] [error] (111)Connection refused: proxy: HTTP: attempt to connect to 127.0.0.1:12002 (127.0.0.1) failed [Fri Jul 08 11:20:00 2011] [error] [client 130.60.139.11] proxy: error reading status line from remote server 127.0.0.1, 开发者_高级运维referer: http://example.org/galleries/1/edit [Fri Jul 08 15:04:19 2011] [error] [client 130.60.139.11] proxy: error reading status line from remote server 127.0.0.1, referer: http://example.org/galleries/1/edit [Fri Jul 08 15:05:01 2011] [error] [client 130.60.139.11] proxy: error reading status line from remote server 127.0.0.1, referer: http://example.org/galleries/1/edit
A 502 error is a "Bad Gateway" error, which is something proxy servers throw sometimes when communication goes wrong. Without knowing the details of your setup, it's hard to say for sure, but I would suspect that either your image processing is using up all available connections, so that your client isn't able to connect to your website, or you're getting a random network error which is masking something happening on your servers.
I would recommend looking in the Rails log for the requests that are throwing these 502 errors and see if there's anything helpful there. If not (and I suspect you won't find anything), this is probably an issue with your web server parameters, and you'll need to provide more information on that.
精彩评论