hi,
I have recently moved a mediawiki instance running on a single server to a haproxy solution and 3 backend apache2 hosts.
The site works fine except now I cannot edit pages.
The error my users get when saving their changes is:
*Sorry! We could not process your edit due to a loss of session data.* Please try again. If it still does not work, try logging out https://wiki.iriszorg.nl/index.php/Speciaal:Afmelden and logging back in.
My environment looks like this:
HAPROXY
httpd1(ip1) httpd2(ip2) httpd3(ip3)
and this is how the backend rule in haproxy looks like:
backend webclusterprod_ssl mode tcp balance leastconn option persist option ssl-hello-chk server httpd1 ip1:443 maxconn 250 check server httpd2 ip2:443 maxconn 250 check server httpd3 ip3:443 maxconn 250 check
The wiki is running in port 443 as you see, and the apache2 hosts are handling the certificate because we use sni (different tls vhosts).
My google foo does nog get me very far. How can I get the edits working again?
TIA, -- Groeten, natxo
On Thu, Jan 8, 2015 at 11:31 AM, Natxo Asenjo natxo.asenjo@gmail.com wrote:
I forgot to mention that the webservers share the mediawiki files on an NFS share.
I have set
session_save_path("tmp");
in LocalSettings.php, the dir tmp relative to it exists and I can see sess_***** files being created. The wiki is with this setting unusable because it takes ages to open a page, or the layout is gone, or one gets page not found errors.
What is the recommended way to share session data behind load balanced sites? Memcached?
TIA, -- Groeten, natxo
On Thu, Jan 8, 2015 at 3:20 PM, Natxo Asenjo natxo.asenjo@gmail.com wrote:
in LocalSettings.php, the dir tmp relative to it exists and I can see sess_***** files being created. The wiki is with this setting unusable because it takes ages to open a page, or the layout is gone, or one gets page not found errors.
instead of "page not found" I should have written: "page reset" errors. My mystake.
-- Groeten, natxo
We have a similar setup using Squid instead of haproxy and have the PHP session path set to a shared NFS folder. That way you won't get "session lost" errors if you switch servers from one page load to another. Another option would be to set $wgSessionsInObjectCache to true ( http://www.mediawiki.org/wiki/Manual:$wgSessionsInObjectCache) and have the sessions stored in the object cache, assuming you have a shared cache setup between the servers.
On 8 January 2015 at 09:22, Natxo Asenjo natxo.asenjo@gmail.com wrote:
On Thu, Jan 8, 2015 at 3:20 PM, Natxo Asenjo natxo.asenjo@gmail.com wrote:
in LocalSettings.php, the dir tmp relative to it exists and I can see sess_***** files being created. The wiki is with this setting unusable because it takes ages to open a page, or the layout is gone, or one gets page not found errors.
instead of "page not found" I should have written: "page reset" errors. My mystake.
-- Groeten, natxo _______________________________________________ MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Hi Dave, On Thu, Jan 8, 2015 at 3:54 PM, Dave Humphrey dave@uesp.net wrote:
We have a similar setup using Squid instead of haproxy and have the PHP session path set to a shared NFS folder. That way you won't get "session lost" errors if you switch servers from one page load to another. Another option would be to set $wgSessionsInObjectCache to true ( http://www.mediawiki.org/wiki/Manual:$wgSessionsInObjectCache) and have the sessions stored in the object cache, assuming you have a shared cache setup between the servers.
Setting the $wgSessionsInObjectCache to true works because we share a mysql server between the apache servers.
Thanks! I would rather not move the loadbalancer to squid because we have already lots of vhosts using it and having squid would be ... confusing.
Thanks again.
-- Groeten, natxo
mediawiki-l@lists.wikimedia.org