Test the OOM situation

Peter Leonov gojpeg at gmail.com
Wed May 19 15:46:13 MSD 2010

On 18.05.2010, at 21:14, Brian Pane wrote:

> On Tue, May 18, 2010 at 9:25 AM, Peter Leonov <gojpeg at gmail.com> wrote:
>> Hello devels,
>> There is a module that requires a heavy testing in environment with low
>> memory. Especialy it could be good to test how it goes if no more memory is
>> available in the system.
>> So the questions are: is there a way to test such a module without a virtual
>> machines? and are there some tools which might be of help?
> Would using setrlimit(2) to reduce RLIMIT_AS on the nginx processes
> be sufficient for your tests?  That wouldn't limit the system-wide memory
> availability, but it would create a limit on how much memory nginx
> could malloc and mmap.

Thanks Brian,
will try to call setrlimit() and then increasingly eat memory more and more. It could help to test an external library in such conditions.

Best regards,

More information about the nginx-devel mailing list