Topic on Project:Support desk

Fazzeh (talkcontribs)

Hi everyone,

I recently took over hosting and administrating a rather large mediawiki (1.27) installation and it's set up on new hardware and a freshly installed CentOS 7.3.11.

We are running an nginx / php-fpm setup with a MariaDB-Galera database (3 node multi-master-cluster).

Everything works as intended, but our users are complaining about getting logged out every now and then. I can't seem to conclude on how often it happens, but according to some users it happens multiple times during a 30minute timeframe.

Our nginx / php installation is:

nginx-mod-http-geoip-1.10.2-1.el7.x86_64

nginx-all-modules-1.10.2-1.el7.noarch

nginx-mod-stream-1.10.2-1.el7.x86_64

nginx-mod-mail-1.10.2-1.el7.x86_64

nginx-1.10.2-1.el7.x86_64

nginx-mod-http-perl-1.10.2-1.el7.x86_64

nginx-mod-http-xslt-filter-1.10.2-1.el7.x86_64

nginx-mod-http-image-filter-1.10.2-1.el7.x86_64

nginx-filesystem-1.10.2-1.el7.noarch

php70w-fpm-7.0.23-2.w7.x86_64

php70w-7.0.23-2.w7.x86_64

php70w-common-7.0.23-2.w7.x86_64

php70w-mysql-7.0.23-2.w7.x86_64

php70w-intl-7.0.23-2.w7.x86_64

php70w-pdo-7.0.23-2.w7.x86_64

php70w-mbstring-7.0.23-2.w7.x86_64

php70w-xml-7.0.23-2.w7.x86_64

php70w-cli-7.0.23-2.w7.x86_64

php70w-gd-7.0.23-2.w7.x86_64

I have set session.gc_maxlifetime = 28800 (8 hrs) but that doesn't seem to affect anything.

Our sessions dir is /var/lib/php/session, but MW doesn't create any session files in that folder.

I have run a mockup session creater to see if sessions are working, and they are, but MW doesn't use that folder for some reason.

I've been scratching my head about this and I can't figure out how MW handles sessions and why users keep getting logged out.

The MW installation itself is an rsync-copy of a previous installation that didn't have this issue so I'm guessing it's due to our configuration, but I can't figure out where we've done anything wrong.

Any help would be greatly appreciated!

MarkAHershberger (talkcontribs)

Make sure that MW is set up to store sessions on the local disk. Also see $wgMainCacheType where it says:

Note: Since MediaWiki 1.27, PHP sessions are stored in a cache, depending on the variable of this setting, unless overridden by $wgSessionCacheType. This may cause problems when CACHE_ACCEL is used. (task T147161)