[OJS3.2.1-1] For maintenance work: Report if users are currently online possible?

Is there a possibility to check, if users are currently online in OJS3? I’m asking, because I want to find a good moment to start maintenance work, without interrupting a user (= without a user being online).

Thanks,
Tobias

Hi,

The control panel of your server most likely has some tools to easily check live connections to your website and will give you some statistics, at least down to the hour. Other 3rd parties tools such as Google Analytics can do the same. Unless your website has very little traffic, it will be hard to find a slot, so you might want to consider scheduling it in advance at a low-traffic time (usually at night/early morning) and display an information banner a bit ahead of time. During maintenance, set up a 503 so that users are aware that work is ongoing.

Hi all,

I’d suggest checking the sessions table in the database. In particular, the last_used column will tell you the exact time the user last visited the site, and user_id will tell you who they are (or null if they are not logged in).

Regards,
Alec Smecher
Public Knowledge Project Team

We are doing something similar to @pheckler’s suggestion. We plan maintenance times in advance and let journal managers know about them. When starting the maintenance we first make a redirect to a page where the current situation is explained, via http server config, excluding our team’s IPs for post-maintenance checks. We then also end all open OJS sessions in the OJS backoffice - which is a bit of a redundancy, but better safe than sorry.

1 Like