SMF and Nginx proxy?

Started by Mr. Jinx, August 20, 2014, 12:54:19 PM

Previous topic - Next topic

Mr. Jinx

Anyone experience with running SMF behind a nginx proxy?
I have recently enabled nginx for my site, but now some users complain about the "show unread posts since last visit" function.
Sometimes the list is empty while there are new posts since their last visit.

I'm not sure if this could be related to the Nginx proxy.

Currently running SMF 2.0.8 / Nginx > Apache 2.4 / PHP 5.5 with Zend opcache / MySQL 5.6

Arantor

Nope, that shouldn't be related to the proxy, but very likely that SMF has updated the time of their 'last visit' meaning that the list is empty...

Mr. Jinx

So I have to find out why it is suddenly updating 'last visit' for some people while it shouldn't.

Arantor

It's kind of by design, and is why the 'show all unread' option is there.

It's all about keeping things fast by culling the possible number of things to look at, since unread is one of the most expensive operations in SMF.

Mr. Jinx

Problem is, users who have used this function all the time suddenly start complaining that it is not working like it should.
The list is sometimes empty while there are plenty new posts since last visit.

Arantor

Except what they call last visit and what SMF calls last visit are never the same thing.

Mr. Jinx

Hm, what hey call last visit: You check the forum in the evening, then shutdown the computer and go to sleep. Next day you start your webbrowser and go directly to the "new message since last visit". The list is empty while people have posted in the night.

ps: This topic should probably go to SMF 2.0.x Support.

Arantor

That could legitimately continue to be the same session in SMF terms, or it could start an entirely new session which confuses it.

Either way, not related to Nginx.

Mr. Jinx

Quote from: ♥ on August 20, 2014, 01:34:40 PM
Except what they call last visit and what SMF calls last visit are never the same thing.
I checked with my users, but they are 100% sure that the last visit behavior changed after the upgrades.
Before the upgrades, they never had an issue with the unread list being empty, so I'm still trying to figure out what is happening.

To be sure I disabled Nginx proxy and zend opcache, but it still produces random empty lists.
The forum is also running https only, could that be related?

Deaks

what mods do you have installed?
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

Mr. Jinx

Nothing new for a while.

1.   Sitemap   2.2.0     
2.   Custom Fields on Topic   1.0     
3.   SMF 2.0.7 Update   1.0     
4.   Tapatalk SMF 2.0 Plugin   4.0.1     
5.   Ohara YouTube Embed   1.0     
6.   SMF4Mobile Mod   1.0     
7.   SMF 1.1.19 / 2.0.6 Update   1.0     
8.   detectBrowser Update   1.0     
9.   Moderator and Administrator Comment Tags   1.8.1
10.   SMF 2.0.2 Update   1.0     
11.   Bookmarks   2.3     
12.   SMF 2.0.4 Update   1.0
13.   H1 Tags in link tree   1.1
14.   SMF 2.0.8 Update   1.0
15.   MCLegendII RC3   3.0     
16.   SMF 2.0.1 Update   1.0     
17.   Internal Links Use Same Window   1.2
18.   SMF 2.0.3 Update   1.0     
19.   SMF Gallery Lite   3.6a     
20.   SMF 2.0.5 Update   1.0

Mr. Jinx

I just noticed that after a rebooting the complete server, the list with "Users active in past 30 minutes:" was empty and had to build up again.
I have never seen this behavior in the past. Normally I could reboot the server, and that list was untouched. Could this be related to APC cache? I have always used APC cache. Now after upgrading to PHP 5.5 I had to skip APC because it's not supported anymore.

Mr. Jinx

Problem solved, in case someone is interested (but it seems awe-full quite over here)...

I seems that the APC user cache actually makes the last visit function work better. At least in a way users expect it to work.
After the upgrade to PHP 5.5 I disabled APC because I thought Zend Opcache would be enough.  However Opcache does not cache user stuff.
So I added APCu, and now every one reports that it works like before. No more empty list.


LiroyvH

I run nginx without APC, but with Zend, on multiple servers; and have never experienced, or have heard of anyone experiencing, the issues you describe.
It's a bit weird that a cacher would solve your issue; something somewhere else still must be misconfigured in your overall setup; it looks like APC merely provides a band-aid to your problem... For whatever reason. :)

Glad you got it sorted though, i'd still dive in to the config non the less.
((U + C + I)x(10 − S)) / 20xAx1 / (1 − sin(F / 10))
President/CEO of Simple Machines - Server Manager
Please do not PM for support - anything else is usually OK.

Mr. Jinx

Yes, well I would like to know what is going on but this is confusing.
Arantor said this is how the last visit function works. SMF's last visit is never the same as the users last visit.
He was not suprised with those lists being empty.

Something that might be related: Do you know if it is normal that the users online list, which is populated, is empty after a server reboot?
This is something new that happend after the upgrade.

Advertisement: