Mailing List Archive

2.0.5_1 - Issue with %udat
Hi,

I'm experiencing something very strange, difficult to explain.

I wrote an application where users can connect to LDAP servers (about
each user connects to a different LDAP server) and execute a search.

* If the ldap server answers, everything is ok.
* If the search does not return, every user accessing %udat is hung. All
pages that do not access %udat work normally.
No message in apache logs. Restarting apache makes everything work again
until someone searches on a "bad" LDAP server.

I know the problem does not come from embperl itself : it's a low-level
network issue. But I don't understand why our frontend application (that
does not rely entirely on LDAP) is impacted this way : %udat accesses
are like "locked" globally.

Does this have to do with Apache::Session lock mechanism ? Could I relax
it while doing my LDAP calls and re-lock immediately after ?
I store things in %udat only after authentication. Could I globally
disable session locking and enable it only when writing to %udat ?

Thanks for your help,

--
Jean-Christophe Boggio -o)
embperl@thefreecat.org /\\
Independant Consultant and Developer _\_V

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
RE: 2.0.5_1 - Issue with %udat [ In reply to ]
Hi,

%udat is read locked das soon as you access it and write locke das soon as you write any data to it.

The lock is release at the end of the page.

There can be any number of reader, but only one writer.

So you should write to %udat as late as possible, to keep the lock time short.

How the lock is create depends on the locking module that is configured for Apache::Session.

For example the file lock has a lock per user, while the semaphore lock only has n lock semaphore which are shared by all users, so two user might use the same semaphore and therefor lock each other

Gerald


> -----Original Message-----
> From: Jean-Christophe Boggio [mailto:embperl@thefreecat.org]
> Sent: Tuesday, September 04, 2012 1:16 AM
> To: embperl@perl.apache.org
> Subject: 2.0.5_1 - Issue with %udat
>
> Hi,
>
> I'm experiencing something very strange, difficult to explain.
>
> I wrote an application where users can connect to LDAP servers (about each
> user connects to a different LDAP server) and execute a search.
>
> * If the ldap server answers, everything is ok.
> * If the search does not return, every user accessing %udat is hung. All pages
> that do not access %udat work normally.
> No message in apache logs. Restarting apache makes everything work again
> until someone searches on a "bad" LDAP server.
>
> I know the problem does not come from embperl itself : it's a low-level
> network issue. But I don't understand why our frontend application (that
> does not rely entirely on LDAP) is impacted this way : %udat accesses are like
> "locked" globally.
>
> Does this have to do with Apache::Session lock mechanism ? Could I relax it
> while doing my LDAP calls and re-lock immediately after ?
> I store things in %udat only after authentication. Could I globally disable
> session locking and enable it only when writing to %udat ?
>
> Thanks for your help,
>
> --
> Jean-Christophe Boggio -o)
> embperl@thefreecat.org /\\
> Independant Consultant and Developer _\_V
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> For additional commands, e-mail: embperl-help@perl.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org