rapache memory problem

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

rapache memory problem

mrzung
Hi all;
Now I'm developing web application by using rapache in ubuntu.
My problem is that as users execute the application, the server PC cumulates memory.
After users close or refresh the application page, the server PC memory is still cumulated.
Now I'm renewing apache machine by manually in terminal.

Is there any way to kill memory when users refresh or close the application page?

Thanks,
Reply | Threaded
Open this post in threaded view
|

Re: rapache memory problem

daroczig
Hello mrzung,

it depends on several factors.

First of all: do your clients use RApache for computations in separate
sessions (possible which computations does not build on the previous ones)
or do they need a stateful application?

The first would be pretty easy to resolve, just clean the R environment at
the end your R scripts (which is a must in long running R sessions anyway).
If the users have direct access to R console (or some similar dynamic
solution and the app needs previous environments despite the fact that
Apache works with children), then e.g. clean the session when they log out.

I think opencpu <http://opencpu.org/> would handle all this, and with
Apparmor (or with another great tool of Jeroen to set the limits
dynamically from R: RAppArmor <https://github.com/jeroenooms/RAppArmor>)
you can force (R)Apache not take more then given amount of RAM, and kill
the process. Well, not always when the users would want that :)

Best,
Gergely


On Thu, Nov 22, 2012 at 5:56 AM, mrzung <[hidden email]> wrote:

> Hi all;
> Now I'm developing web application by using rapache in ubuntu.
> My problem is that as users execute the application, the server PC
> cumulates
> memory.
> After users close or refresh the application page, the server PC memory is
> still cumulated.
> Now I'm renewing apache machine by manually in terminal.
>
> Is there any way to kill memory when users refresh or close the application
> page?
>
> Thanks,
>
>
>
>
> --
> View this message in context:
> http://r.789695.n4.nabble.com/rapache-memory-problem-tp4650412.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.