Path

ez projects / ezsnmpd / forum / general / session counter increases w...


Session counter increases with every SNMP call

You need to be logged in to post messages in the forums. New users may register here.

Markus Birth

Member since:
29 January 2008

Posts: 3

Friday 02 October 2009 12:50:51 pm

I'm building a status watcher which should query your extension via HTTP for several values.

While testing I noticed that the session counter increases with every call I make. So if I make a query per minute, the session counter will be increased by 60 after one hour without anyone else being active on the server.

Can this be fixed?

Best regards

Markus Birth

Cheers,
-mARKUS

http://gplus.to/mbirth

Up

Gaetano Giunta

Member since:
01 May 2012

Posts: 268

Friday 02 October 2009 1:11:40 pm

That's an interesting side effect, which I did not foresee. The extension was developed with snmpd in mind after all, with the http interface added on as courtesy.

The fact is that eZ Publish by default creates a new user session for every http request received from a user that has no session cookie. It is quite hard to work around that, and afaik it will only be possible in 4.3 - it is in fact a limiting factor for scalability being addressed.

I do not have enough spare time at the moment to dedicate to the creation of a different index.php that does not start a php session, so I can only suggest workarounds:

- try to force your monitoring tool into sending a session cookie

- lower session timeouts so that the session count does not increase too much. If session timeout is at 60 minutes and you query status every 60 seconds, you will have, after 1 hour warmup, a session count always at 60+real_number

- use the php cli script to get the values out of the server, or the snmpd version.

Principal Consultant International Business
Member of the Community Project Board

Up

Markus Birth

Member since:
29 January 2008

Posts: 3

Monday 16 November 2009 5:00:01 pm

Just wanted to let you know that sending back the session cookie (received upon first call) works fine. Now the session counter doesn't increase anymore.

Cheers,
Markus Birth

Cheers,
-mARKUS

http://gplus.to/mbirth

Up

You need to be logged in to post messages in the forums. New users may register here.