0

After reading this blog post on OpenCPU, I have questions about Sessions:
* when/how do sessions expire?
* can session expire time be configured on the server?
* can session expire time be changed at runtime?
* are sessions saved on-disk or in-memory?
* do sessions work with the nginx opencpu proxy?

Thanks in advance!

  • These seem like things that might be discussed in [the help](https://www.opencpu.org/help.html) – Rich Scriven Aug 23 '15 at 22:52
  • It is preferred if you can post separate questions instead of combining your questions into one. That way, it helps the people answering your question and also others hunting for at least one of your questions. Thanks! – josliber Aug 23 '15 at 23:09

1 Answers1

3

Probably better suited for the mailing list. Also have a look at the paper for some of these topics.

When/how do sessions expire?

The default expiration for temporary sessions in the server implementation is 24h.

Can session expire time be configured on the server?

You could edit the /usr/lib/opencpu/scripts/cleanocpu.sh script, which get triggered through /etc/cron.d/opencpu. But if you want persistence it is usually better to store things in a database (RMySQL, mongolite, etc) or in a package on the server, or in the client.

Can session expire time be changed at runtime?

No, expiration of resources is up to the server.

Are sessions saved on-disk or in-memory?

The current implementation saves on disk (with a bit of in-memory cache), but the API is agnostic.

Do sessions work with the nginx opencpu proxy?

Yes, they are no different than anything else on the server.

Jeroen Ooms
  • 31,998
  • 35
  • 134
  • 207