Displaying 20 results from an estimated 10000 matches similar to: "strategies for securing attachment files from unwanted access"
2007 Dec 18
3
Mongrel + Lighttpd
Hi guys,
I''ve been chasing a problem in my web-stack: Lighttpd -> Mongrel ->
Rails, and found a problem with the interaction of Lighttpd and Mongrel.
If a request takes more than 5 seconds, Lighty will retry it - and
then the requests / responses get mixed up in Lighty and it returns a
bad response to the client. Not good.
I''m convinced that the problem is
2007 Nov 08
5
Rails byte-range request support
Hi,
I''m trying to serve the iPhone a video file from my controller using
send_file. However, it appears as thought the iPhone requires byte-
range request support and rails doesn''t seem to support this.
If I give the iPhone a url that points to an actual file (i.e. it''s
served by my webserver nginx, instead of rails) it downloads and plays
it fine.
Here is the proof
2007 Mar 07
3
Is there a thread safe ActiveRecord replacement?
I''m using merb as an application server backend for a client application, the goal is to be able to handle thousands of parallell sessions (not parallell requests). It will use sendfile to send files.
The controller uses an singleton that saves sessions in a hash that is memory resident cross requests, but isn''t persistent otherwise.
I''m using ActiveRecord since there
2007 Dec 12
10
sendfile and mongrel
forgive me if this has been resolved already...
I have an app that is using sendfile to return large files to customers.
We can''t use regular Apache to handle this static content since the
files are what the customers are paying for - so it wouldn''t be cool for
anyone else to get access to them.
The issue is that the mongrel mem footprint gets bloated when the files
are
2007 Jun 10
6
Securing private file area
I''m building an application for a company that has thousands of clients, and
for each client there will a set of documents that are private to that
client. Rails makes it easy, of course, to show the list of documents on a
per-client basis, using acts_as_authenticated and using current_user as part
of the find any time a document list is displayed.
The part for which I''m looking
2008 Jun 17
6
x_send_file sends a 1 byte file
Hello,
sorry if creating a dupe...
I''m trying to download files to authenticated users in my app. I''ve set
up x_send_file. All seems to be correct to me, however when I try to
download any file, I get a 1-byte long file downloaded.
I am getting this already in development - so no Apache, no lighthttpd,
just a mongrel_rails start in the root of my app.
Any help/hint would be
2007 Nov 08
5
byte-range requests
I''m trying to sent a file to the iphone (which requires byte-range
request support) using the rails send_file method. However, this
fails, I think because of mongrel. I think so because if I send the
iphone a file handled by nginx, it plays it fine. But then when I
serve the file with rails the iphone can''t play it.
Any ideas?
Alex
2007 Jun 21
1
x-sendfile horrendously slow?
I''m using Camping (though I suspect this applies to RoR just as well,
and if you have an RoR specific answer I''d be happy to hear it, I may
switch) to do a number of things for an internal application, one of
which is transferring large files (~2GB each) between machines over the
network. I thought the easy route would just be to make an app that
when given the filename, serves
2024 Mar 06
2
Question on supporting sendfile()
Hi all,
sendfile() could be enabled in NGINX(https://www.sobyte.net/post/2022-08/nginx-send/). It could improves the performance since it could optimize to transfer data to user space. Up to now, sendfile() isn?t supported in OpenSSH yet. Will it be supported in the future?
Best Regards
Haojian
2008 Jan 08
4
XSendFile in development environment
Hi
I''m currently trying to use X-Sendfile to take some load off my rails
app, unfortunately in my development environment mongrel is happily
passing through the x-sendfile header, presumably for the (non-
existant) proxy to handle the header.
Is there some way to make mongrel process the x-sendfile header itself?
Thanks
jebw
2007 Aug 19
16
Possible memory leak problem...
I''m trying to figure out a possible memory leak problem I have in my
application.
I''ve tested both with mongrel and webrick and the problem remains. So
I think it''s not a mongrel problem, but I''m posting here to see if
anybody can help me.
The RAILS application is quite simple, no special plugins ( no
RMagick that has the memory problem ),
2010 Feb 14
6
Nginx Sock And Rails Envinroment Error
Hi There,
Im running an amazon instance with nginx proxying to a unicorn sock.
For some reason, even though i specify the production environment, when being visited by nginx, the site shows errors in development form.
Interestingly, when running on a port rather than a sock, if i visit that port, the errors are rendered as normal with a 500 page, the same port, throught nginx, shows errors
2006 Dec 07
17
compress and max upload size?
I am using mongrel_cluster with mod_proxy_balancer and would like to
enable compression (assuming it improves throughtput) and limit file
size upload. I configured mod_deflate and LimitRequestSize in Apache,
but in my trials looks like the proxied calls bypass those directives
(the conf goes below).
Is there a way to get this?
-- fxn
# Adapt this .example locally, as usual.
#
# To be
2006 Jan 12
2
ActionController#send_file
Looking at the code for ActionController#send_file I see that it is
using ruby to send the file contents. Linux supports a sendfile() OS
call. The implementation of Linux sendfile() is extremely fast and
very CPU efficient, far faster than what can be done in user space.
Does Windows support a sendfile() equivalent call? I haven''t been
working with ruby long enough to know how it handles
2006 Dec 21
6
Rails'' send_file, Mongrel, and *gasp* memory
I''ve had a right fun few days at work trying to figure out why our Rails
app (which isn''t under very heavy load) kept eating memory and bringing
our server to our knees. Eventually I traced it to send_file (which was
in a way a relief as it wasn''t down to my coding ;) -- every time a user
started downloading, the memory consumed by the app would jump, and
2008 Nov 24
1
RELENG_7 panic under load: vm_page_unwire: invalid wire count: 0
Box with fresh RELENG_7 panic under heavy network load (more than 50k connections).
This panics seems to be senfile(2) related, because when sendfile disabled in nginx, I can't reproduce the problem.
Backtrace in all cases like this:
# kgdb kernel /spool/crash/vmcore.1
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General
2012 Dec 06
2
pasenger does not start puppet master under nginx
On the server
[root@bangvmpllDA02 logs]# ruby -v
ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
[root@bangvmpllDA02 logs]# puppet --version
3.0.1
and
[root@bangvmpllDA02 logs]# service nginx configtest
nginx: the configuration file /apps/nginx/nginx.conf syntax is ok
nginx: configuration file /apps/nginx/nginx.conf test is successful
[root@bangvmpllDA02 logs]# service nginx status
2011 Jun 25
3
Unicorn and streaming in Rails 3.1
Streaming works with Unicorn + Apache. Both with and without deflating.
My understanding is that Unicorn + Apache is not a good combination
though because Apache does not buffer, and thus Unicorn has no fast
client in front. (I don''t know which is the ultimate technical reason
Unicorn puts such an emphasis on fast clients, but will do some
research about it.)
I have seen in
2007 Sep 03
2
Mongrel and Memory usage.
Hi,
I am using mongrel for a long time... But just now I see a problem. I am
running 3 instances using mongrel_cluster and nginx as a reverse proxy. When
I start the cluster I have a memory usage of 20MB per instance... In the end
of the day this usage is something about 230MB for each instance. It should
be a memory leak?
Thanks for the help.
--
Fernando Lujan
-------------- next part
2006 May 14
3
send_file and locking files after download?
Hello,
I''m working on a download service which grants users a one-time-download
access to files. The idea is to write an entry to a database table after
a successful download that "locks" the download link for the user.
After doing some quick tests with send_file I noticed that send_file
does not block until the user has downloaded the full file, but proceeds
with the