Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Problem occurs when uploading file via Apache proxy |
|
Author |
|
racheats
Joined: 16 Jul 2016 Posts: 1 Location: Indonesia, Jakarta
|
Posted: Sat 16 Jul '16 16:21 Post subject: Problem occurs when uploading file via Apache proxy |
|
|
Hi, I've currently facing problem with Apache when proceed upload file from my node.js app. Problem occurs when file upload larger than 5kb, if the file smaller from 5kb it works well. I've tried my node app in my other vps without Apache and it works like a charm with file size 2mb. So far I've tried couple of solution like timeout, keepalive but still not works, is there any conf that i missing in Apache proxy? Really need a help, Thanks!
Apache Version : 2.4.18 (Unix)
OS : Centos 7
*Below is my vhost conf in httpd.conf
Code: |
<VirtualHost ipaddress:80>
ServerName sub.domain.web.id
ServerAlias www.sub.domain.web.id
ServerAdmin webmaster@sub.domain.web.id
Timeout 300
KeepAlive On
ProxyRequests Off
<Proxy "*">
Require all granted
<Proxy>
<Location "/">
ProxyPass http://localhost:5100/ connectiontimeout=40 timeout=60 Keepalive=On min=20 acquire=20 retry=0
ProxyPass http://localhost:5100/
</Location>
SetEnv proxy-sendchunked 1
SetEnv proxy-initial-not-pooled
SetEnv force-proxy-request-1.0 1
</VirtualHost>
|
*This is my /apache/logs/error_log
Code: |
[proxy:error] Broken pipe: pass request body failed
[proxy_http:error] AH01097 : pass request body failed
[proxy:error] ap_proxy_connect_backend disabling worker for (127.0.0.1) for 60s
|
*Result in the browser when do upload >5kb
Code: |
502 Bad Gateway
The proxy server received an invalid
response from an upstream server.
|
*solution like change localhost to 127.0.0.1/myhostname i've already tried to and not works
*i think i missed something, like if we need to load modules mod_proxy or mod_proxy_http? since the .so file not exist in /apache/modules |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Fri 22 Jul '16 0:13 Post subject: |
|
|
Since you use KeepAlive in the proxy connection you may inscrease the TTL ( add it like the other params to ProxyPass
I would first try to disable KeepAlive to the Backend. |
|
Back to top |
|
|
|
|
|
|