YYdscvafZTgajkdfv
Reported by rolando | September 1st, 2008 @ 10:23 PM | in Future
If requesting a large (over 600MB) static file, thin eats a lot of memory, here are some hints:
rolando@prod01:/var/www/spawner/sites/scio.cl$ ps -fu rolando
UID PID PPID C STIME TTY TIME CMD
rolando 20951 20948 0 12:08 ? 00:00:00 sshd: rolando@pts/1
rolando 20952 20951 0 12:08 pts/1 00:00:00 -bash
rolando 21038 1 6 12:15 ? 00:00:00 thin server (0.0.0.0:3000)
rolando@prod01:/var/www/spawner/sites/scio.cl$ ps -opid,rss,cmd -u rolando
PID RSS CMD
20951 664 sshd: rolando@pts/1
20952 1524 -bash
21038 14848 thin server (0.0.0.0:3000)
21043 876 ps -opid,rss,cmd -u rolando
# here I request a large static file
rolando@prod01:/var/www/spawner/sites/scio.cl$ ps -opid,rss,cmd -u rolando
PID RSS CMD
20951 664 sshd: rolando@pts/1
20952 1524 -bash
21038 166284 thin server (0.0.0.0:3000)
21044 872 ps -opid,rss,cmd -u rolando
rolando@prod01:/var/www/spawner/sites/scio.cl$ ps -opid,rss,cmd -u rolando
PID RSS CMD
20951 664 sshd: rolando@pts/1
20952 1524 -bash
21038 291064 thin server (0.0.0.0:3000)
21045 876 ps -opid,rss,cmd -u rolando
rolando@prod01:/var/www/spawner/sites/scio.cl$ ps -opid,rss,cmd -u rolando
PID RSS CMD
20951 664 sshd: rolando@pts/1
20952 1524 -bash
21038 310892 thin server (0.0.0.0:3000)
21046 876 ps -opid,rss,cmd -u rolando
rolando@prod01:/var/www/spawner/sites/scio.cl$ ps -opid,rss,cmd -u rolando
PID RSS CMD
20951 664 sshd: rolando@pts/1
20952 1520 -bash
21038 399180 thin server (0.0.0.0:3000)
21047 876 ps -opid,rss,cmd -u rolando
# had to kill it the hard way
rolando@prod01:/var/www/spawner/sites/scio.cl$ kill -9 21038
rolando@prod01:/var/www/spawner/sites/scio.cl$ ps -opid,rss,cmd -u rolando
PID RSS CMD
20951 664 sshd: rolando@pts/1
20952 1516 -bash
21048 876 ps -opid,rss,cmd -u rolando
Comments and changes to this ticket
-
macournoyer September 1st, 2008 @ 10:27 PM
- State changed from new to open
- Tag set to memory
hey Rolando,
This all depends on how you send the file in the code. Are you using Rails? Can you paste the code that sends the file.
Also tell me which version of Thin you are using (thin -v).
Thx for reporting!
-
macournoyer September 5th, 2008 @ 09:16 AM
I know this is how it's done in the adapter, but that is just for development. Serving static file should be done by a "real" web server like apache or nginx.
Or if you really want to do it in Ruby you should use streaming.
-
macournoyer September 5th, 2008 @ 10:14 AM
You can use the X-Sendfile header to process the request in Ruby but send the file using lighty:
-
macournoyer September 28th, 2008 @ 02:46 PM
- State changed from open to invalid
-
ardthurxen (at gmail) June 17th, 2016 @ 08:31 AM
- Title changed from thin eats all memory when requesting a large static file to YYdscvafZTgajkdfv
- Tag cleared.
- Assigned user changed from macournoyer to Kevin Williams
Gtczxvdg http://fxfskrddfbxdf.com
here: Gtczxvdg http://fxfskrddfbxdf.com
best Gtczxvdg http://fxfskrddfbxdf.com
Maefegvtjy
dfsdgbcdsHLBHFDasufksdfjln Maefegvtjy
Ozxcjkl Maefegvtjy dfdfdfdsdgd
FGxczDHXfgvdhjhjhjhsdadddfxgbnbm
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป