[phusion-passenger] file upload is timing out

262 views
Skip to first unread message

deepak

unread,
May 21, 2010, 2:21:47 AM5/21/10
to Phusion Passenger Discussions
hi,
cannot upload a 8.4 MB file.

see this error:
[ pid=10222 file=ext/apache2/Hooks.cpp:727 time=2010-05-18
07:13:14.842 ]:
Unexpected error in mod_passenger: An error occurred while receiving
HTTP upload data: Connection reset by peer (104)
Backtrace:
in 'boost::shared_ptr<Passenger::BufferedUpload>
Hooks::receiveRequestBody(request_rec*, const char*)' (Hooks.cpp:1084)
in 'int Hooks::handleRequest(request_rec*)' (Hooks.cpp:459)

TimeOut is set as 1200 in the virtalhost

transferring the file via scp took 4.1 minutes

cheers,
deepak

--
You received this message because you are subscribed to the Google Groups "Phusion Passenger Discussions" group.
To post to this group, send email to phusion-...@googlegroups.com.
To unsubscribe from this group, send email to phusion-passen...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/phusion-passenger?hl=en.

deepak

unread,
May 25, 2010, 5:33:10 AM5/25/10
to Phusion Passenger Discussions
Someother errors are:

1)
[ pid=16593 file=ext/apache2/Hooks.cpp:727 time=2010-05-23
23:06:12.156 ]:
Unexpected error in mod_passenger: It looks like the browser did not
finish the file upload: it said it will upload 6610086\
bytes, but it closed the connection after sending 610155 bytes. The
user probably clicked Stop in the browser or his Interne\
t connection
stalled.

Backtrace:
in 'boost::shared_ptr<Passenger::BufferedUpload>
Hooks::receiveRequestBody(request_rec*, const char*)' (Hooks.cpp:
1084)
in 'int Hooks::handleRequest(request_rec*)' (Hooks.cpp:
459)

NOTE:user had not cancelled or anything. He was on IE6 :-)

2)
[ pid=28995 file=ext/apache2/Hooks.cpp:727 time=2010-05-17
00:40:18.697 ]:
Unexpected error in mod_passenger: Could not send data to the
ApplicationPool server: write() failed: Broken pipe (32)

Backtrace:
in 'virtual boost::shared_ptr<Passenger::Application::Session>
Passenger::ApplicationPoolServer::Client::get(const Passe\
nger::PoolOptions&)' (ApplicationPoolServer.h:
402)
in 'int Hooks::handleRequest(request_rec*)' (Hooks.cpp:
523)

3)
[ pid=10222 file=ext/apache2/Hooks.cpp:727 time=2010-05-18
07:13:14.842 ]:
Unexpected error in mod_passenger: An error occurred while receiving
HTTP upload data: Connection reset by peer (104)

Backtrace:
in 'boost::shared_ptr<Passenger::BufferedUpload>
Hooks::receiveRequestBody(request_rec*, const char*)' (Hooks.cpp:
1084)
in 'int Hooks::handleRequest(request_rec*)' (Hooks.cpp:459)

NOTE:user had not cancelled or anything. He was on firefox :-)

Another questions are:
1) is there a debug mode in passenger - verbose logging
2) can i handle the upload outside of apache and then hand it off to
passenger
3) have also tried mod_porter (http://modporter.com/) it does not seem
to help

Any help?

regards,
deepak

Hongli Lai

unread,
May 25, 2010, 5:37:38 AM5/25/10
to phusion-...@googlegroups.com
I don't think I can be of any help to you. This looks like some kind
of Apache issue or Internet connection issue. We use Apache's file
upload receiving mechanism so if that fails there's nothing we can do
about it. Maybe you'll have more luck at some Apache support forum.

--
Phusion | The Computer Science Company

Web: http://www.phusion.nl/
E-mail: in...@phusion.nl
Chamber of commerce no: 08173483 (The Netherlands)

deepak kannan

unread,
May 25, 2010, 8:47:06 AM5/25/10
to phusion-...@googlegroups.com
Thanks for the reply.

can u point me to the simplest working code with upload.
Sorry if it seems noobish but i want to try another piece-of-code to check if there is a bug in my code.
The version of apache and passenger would be helpful.

Also, can the file upload be taken out of passenger. And when the file upload is complete it is handed off to passenger.

regards,
deepak

Hongli Lai

unread,
May 25, 2010, 9:14:57 AM5/25/10
to phusion-...@googlegroups.com
On Tue, May 25, 2010 at 2:47 PM, deepak kannan <kannan...@gmail.com> wrote:
> Thanks for the reply.
>
> can u point me to the simplest working code with upload.

It's not your code. The error message indicates a problem in either
Apache or the network connection. You didn't do anything wrong in the
app, the problem is likely in the environment.

deepak

unread,
May 28, 2010, 8:58:41 AM5/28/10
to Phusion Passenger Discussions
hi,
We are using a netscalar loadbalancer and it does seem like an
environment issue.
http://support.citrix.com/article/CTX123833 [ Unable to Upload Files
to the Backend Application Servers Using HTTP ]
http://support.citrix.com/article/CTX122322 [ Uploading Large File
though a NetScaler Appliance takes more Time as Compared to Direct
Server Access ]
http://lists.centos.org/pipermail/centos/2009-December/087887.html

sorry, if this is not the appropriate place to ask this, but has
anyone faced this problem before with netscalar loadbalancer.

Also,
1) is there a debug mode in passenger - verbose logging. I tried
PassengerLogLevel but it does not show me the files being buffered
etc. Can i log every step, would help to debug proglems (and report
bugs if any)
2) can i handle the upload outside of apache and then hand it off to
passenger. Is this question relevant?
3) is mod_porter (http://modporter.com/) supported, is it recommended?

regards,
deepak

On May 25, 6:14 pm, Hongli Lai <hon...@phusion.nl> wrote:
> On Tue, May 25, 2010 at 2:47 PM, deepak kannan <kannan.dee...@gmail.com> wrote:
> > Thanks for the reply.
>
> > can u point me to the simplest working code with upload.
>
> It's not your code. The error message indicates a problem in either
> Apache or the network connection. You didn't do anything wrong in the
> app, the problem is likely in the environment.
>
> --
> Phusion | The Computer Science Company
>
> Web:http://www.phusion.nl/
> E-mail: i...@phusion.nl

deepak

unread,
May 28, 2010, 9:06:36 AM5/28/10
to Phusion Passenger Discussions
hi,
i wanted to debug the apache process by running strace, but i do not
want passenger to spawn/kill a processes.
I want one process to be running at all times so that i can run strace
on it.

I have his configuration: http://pastie.org/979733
* why are 5 processed started even when PassengerMaxPoolSize is given
as 2
* passenger-status does not show any info under 'Domains'
* how can i tell which process is doing what, does passenger have
something like mongrel_proctitle, i can do a lsof but it is too
cumbersome.

==== START copy of http://pastie.org/979733
mod_passenger config:
<IfModule passenger_module>
PassengerRoot /home/deepak/.rvm/gems/ree-1.8.7-2010.01/gems/
passenger-2.2.11
PassengerRuby /home/deepak/.rvm/bin/passenger_ruby
###debugging
PassengerMaxPoolSize 2
PassengerMaxInstancesPerApp 0
PassengerMaxRequests 0
PassengerPoolIdleTime 30000
PassengerStatThrottleRate 12000
PassengerLogLevel 3
PassengerDefaultUser www-data
</IfModule>

ps axjf dump: (why are 5 processed started even when
PassengerMaxPoolSize is given as 2)
/usr/sbin/apache2 -k start
8313 8337 8313 8313 ? -1 Sl 0 0:00 \_ /home/
deepak/.rvm/gems/ree-1.8.7-2010.01/gems/passenger-2.2.11/ext/apache2/
ApplicationPoolServerExecutable 3 /home/deepak/.rvm/gems/
ree-1.8.7-2010.01/gems/passenger-2.2.11/bin/passenger-spawn-server /
home/deepak/.rvm/bin/passenger_ruby /tmp/passenger.8313
8337 8338 8313 8313 ? -1 S 0 0:00 | \_
Passenger spawn
server
8313 8342 8313 8313 ? -1 S 33 0:00 \_ /usr/sbin/
apache2 -k start
8313 8343 8313 8313 ? -1 S 33 0:00 \_ /usr/sbin/
apache2 -k start
8313 8344 8313 8313 ? -1 S 33 0:00 \_ /usr/sbin/
apache2 -k start
8313 8345 8313 8313 ? -1 S 33 0:00 \_ /usr/sbin/
apache2 -k start
8313 8346 8313 8313 ? -1 S 33 0:00 \_ /usr/sbin/
apache2 -k start


sudo /home/deepak/.rvm/gems/ree-1.8.7-2010.01/bin/passenger-status
----------- General information -----------
max = 2
count = 0
active = 0
inactive = 0
Waiting on global queue: 0

----------- Domains -----------

==== END copy of http://pastie.org/979733

regards,
deepak

On May 25, 6:14 pm, Hongli Lai <hon...@phusion.nl> wrote:
> On Tue, May 25, 2010 at 2:47 PM, deepak kannan <kannan.dee...@gmail.com> wrote:
> > Thanks for the reply.
>
> > can u point me to the simplest working code with upload.
>
> It's not your code. The error message indicates a problem in either
> Apache or the network connection. You didn't do anything wrong in the
> app, the problem is likely in the environment.
>
> --
> Phusion | The Computer Science Company
>
> Web:http://www.phusion.nl/
> E-mail: i...@phusion.nl
Reply all
Reply to author
Forward
0 new messages