Re: [SM-USERS] Load Balancing and session side effect

2005-04-29 Thread Tuc at Beach House
> > I can reproduce "Warning: Unknown(): Your script possibly relies on a > session side-effect which existed until PHP 4.2.3." error only if I enable > session.auto_start. I think this means that session.auto_start=1 is not > solution to your problems or we have to fix something in squirrelmail.

Re: [SM-USERS] Load Balancing and session side effect

2005-04-29 Thread John Madden
> b) Two different servers (or the same server) trying to access the > session data for the same SID at the same time. How can a user of SM > generate two accesses to session data at the same time?. And how do you > use SM to generate two pararell accesses from two different webservers > in the clu

Re: [SM-USERS] Load Balancing and session side effect

2005-04-29 Thread p dont think
Rafael Martinez Guerrero wrote: > On Thu, 2005-04-28 at 16:18, John Madden wrote: > >>>No, not at all. Three consecutive request can be served by three >>>different webservers. >> >>So is there something in your SQL session handler (locking?) that prevents >>multiple s

Re: [SM-USERS] Load Balancing and session side effect

2005-04-29 Thread Rafael Martinez Guerrero
On Thu, 2005-04-28 at 16:18, John Madden wrote: > > No, not at all. Three consecutive request can be served by three > > different webservers. > > So is there something in your SQL session handler (locking?) that prevents > multiple servers from clashing? > > John > John, I do not understand wh

Re: [SM-USERS] Load Balancing and session side effect

2005-04-29 Thread Rafael Martinez Guerrero
On Thu, 2005-04-28 at 16:23, Jonathan Angliss wrote: [] > > > Can this happen? What is the probability of two different users getting > > the same session ID? > > Note it is not only two users, but two web servers. It is possible, > but the possibility of it is probably VERY slim. The

Re: [SM-USERS] Load Balancing and session side effect

2005-04-29 Thread Rafael Martinez Guerrero
On Thu, 2005-04-28 at 22:21, p dont think wrote: [] > > Hrm. Have you done any special tweaking to your postgres setup to make > it as highly responsive as you obviously need it to be? > - postgresql 7.4.7 in a server with 4GB ram and 2 x Intel(R) Xeon(TM) CPU 2.80GHz. - Backup/log

Re: [SM-USERS] Load Balancing and session side effect

2005-04-29 Thread Rafael Martinez Guerrero
On Thu, 2005-04-28 at 16:20, John Madden wrote: [] > > Another reason is that we want full/instantaneous automatic feilover. If > > we use persistence with a 15-second timeout, many users will get > > problems if the server they are using stops working. > > Doesn't LVS handle this automagicall

Re: [SM-USERS] Load Balancing and session side effect

2005-04-29 Thread Rafael Martinez Guerrero
On Thu, 2005-04-28 at 22:13, p dont think wrote: [] > > > > We have to proxy servers in front of the imap servers, and three imap > > servers connected to an EVA RAID storage solution from HP running a > > ServiceGuard software. > > What IMAP server are you using? Does Perdition work wel

Re: [SM-USERS] Load Balancing and session side effect

2005-04-28 Thread Paul Lesneiwski
John Madden wrote: >>>Using persistence is a shield against this sort of problem. It allows >>>changes >>>to >>>be sync'd NFS-wise and to ensure that "the previous web server" isn't doing >>>anything else with the session file. All user activity within the >>>persisten

Re: [SM-USERS] Load Balancing and session side effect

2005-04-28 Thread p dont think
Jonathan Angliss wrote: Hello p, Thursday, April 28, 2005, 3:44:33 PM, you wrote: - User 1 logs in to webserver 1, gets session id abc123 - User 2 logs in to webserver 2, gets session id abc123 and trashes current contents of abc123 session file Can this happen? What is the probability of two

Re: [SM-USERS] Load Balancing and session side effect

2005-04-28 Thread John Madden
> Looking at the php session code in the ext/session/mod_files.c file > which is what I believe is used to handle the file based sessions, > flock() is called on the session file itself, using an exclusive lock. > Maybe I missed a bit of the thread somewhere on this bit... what is > the problem wit

Re: [SM-USERS] Load Balancing and session side effect

2005-04-28 Thread Jonathan Angliss
Hello p, Thursday, April 28, 2005, 3:44:33 PM, you wrote: - User 1 logs in to webserver 1, gets session id abc123 - User 2 logs in to webserver 2, gets session id abc123 and trashes current contents of abc123 session file >>> Can this happen? What is the probability of tw

Re: [SM-USERS] Load Balancing and session side effect

2005-04-28 Thread John Madden
>> Using persistence is a shield against this sort of problem. It allows >> changes >> to >> be sync'd NFS-wise and to ensure that "the previous web server" isn't doing >> anything else with the session file. All user activity within the >> persistence >> timeout is bound to "the previous web s

Re: [SM-USERS] Load Balancing and session side effect

2005-04-28 Thread Paul Lesneiwski
John Madden wrote: If using NFS as the session store, you don't even have to get this specific -- one user using "his" session from two servers simultaneously will eventually see problems. Isn't that an argument not to use LVS persistence? Using persistence is a shield against this sort of proble

Re: [SM-USERS] Load Balancing and session side effect

2005-04-28 Thread John Madden
> Although John's example of a single user hitting the same legitimate > session file just by doing multiple simultaneous requests from different > tabs/windows for a single login does seem like a potential problem... > again, unless PHP's locking mechanism is file system-based. (...And as long as

Re: [SM-USERS] Load Balancing and session side effect

2005-04-28 Thread John Madden
>> If using NFS as the session store, you don't even have to get this specific >> -- >> one >> user using "his" session from two servers simultaneously will eventually see >> problems. > > Isn't that an argument not to use LVS persistence? Using persistence is a shield against this sort of proble

Re: [SM-USERS] Load Balancing and session side effect

2005-04-28 Thread p dont think
Jonathan Angliss wrote: Hello John Madden, On Thursday, April 28, 2005, you wrote: - User 1 logs in to webserver 1, gets session id abc123 - User 2 logs in to webserver 2, gets session id abc123 and trashes current contents of abc123 session file If using NFS as the session store, you don't

Re: [SM-USERS] Load Balancing and session side effect

2005-04-28 Thread p dont think
Jonathan Angliss wrote: Hello Rafael Martinez Guerrero, On Thursday, April 28, 2005, you wrote: On Thu, 2005-04-28 at 01:01, Jonathan Angliss wrote: - User 1 logs in to webserver 1, gets session id abc123 - User 2 logs in to webserver 2, gets session id abc123 and trashes current contents o

Re: [SM-USERS] Load Balancing and session side effect

2005-04-28 Thread Paul Lesneiwski
John Madden wrote: - User 1 logs in to webserver 1, gets session id abc123 - User 2 logs in to webserver 2, gets session id abc123 and trashes current contents of abc123 session file If using NFS as the session store, you don't even have to get this specific -- one user using "his" session

Re: [SM-USERS] Load Balancing and session side effect

2005-04-28 Thread p dont think
Rafael Martinez Guerrero wrote: > On Wed, 2005-04-27 at 23:57, p dont think wrote: > > >>>The only change in the SM code to save session data in a DB is a >>>"require_once("db_sessions.php")" line in functions/global.php to >>>include a file we have programed to define t

Re: [SM-USERS] Load Balancing and session side effect

2005-04-28 Thread p dont think
>>>We have a cluster of 4 linux servers running SM without problems. >>> >>>3 webservers running apache/PHP/SM and a database server running >>>postgreSQL for sessions/addressbooks/userprefs. >>> >>>We use LVS to access the webservers so we have full >>>failover/redundancy/load b

Re: [SM-USERS] Load Balancing and session side effect

2005-04-28 Thread John Madden
> So your saying that between children of a webserver PHP can handle it, > but if, for example, you set up 2 webserver instances on the same machine > with different IPs to the same physical filesystem then it too would be an > issue? Is there some other directory that php uses, or is it sema

Re: [SM-USERS] Load Balancing and session side effect

2005-04-28 Thread John Madden
> I'm still not sure WHY they will see problems. What is the difference > of 2 servers using a common store compared to 1 server with multiple accesses > to a single store? One server "knows what it's doing." One server has no idea what anyone else is doing. John -- John Madden UNIX S

Re: [SM-USERS] Load Balancing and session side effect

2005-04-28 Thread Tomas Kuliavas
>> >Ports, but according to php-info : >> > >> > './configure' '--enable-versioning' '--enable-memory-limit' >> > '--with-layout=GNU' '--with-config-file-scan-dir=/usr/local/etc/php' >> > '--disable-all' '--with-regex=php' '--with-openssl=/usr' >> > '--with-openssl-dir=/usr' '--with-apxs=/usr/l

Re: [SM-USERS] Load Balancing and session side effect

2005-04-28 Thread Tuc at Beach House
> > Ports, but according to php-info : > > > > './configure' '--enable-versioning' '--enable-memory-limit' > > '--with-layout=GNU' '--with-config-file-scan-dir=/usr/local/etc/php' > > '--disable-all' '--with-regex=php' '--with-openssl=/usr' > > '--with-openssl-dir=/usr' '--with-apxs=/usr/local/

Re: [SM-USERS] Load Balancing and session side effect

2005-04-28 Thread Tomas Kuliavas
>> >> >> You forgot to provide list of installed plugins. SquirrelMail stock >> plugins should not create this error. Remove all enabled plugins >> and >> enable them one by one. >> >> >>> No plugins installed. >> >> >> >> what modifications are made in squirrelmail script

Re: [SM-USERS] Load Balancing and session side effect

2005-04-28 Thread Tuc at Beach House
> > > Is this possible even with plain NFS if both servers point to the same > > session store over NFS? I thought NFS was designed to avoid that. Is > > the only solution to run NFS on top of something like GFS? What a hassle. > > Yes. However it is that PHP prevents multiple scripts from ac

Re: [SM-USERS] Load Balancing and session side effect

2005-04-28 Thread Tuc at Beach House
> > > - User 1 logs in to webserver 1, gets session id abc123 > > > > - User 2 logs in to webserver 2, gets session id abc123 and trashes > > current contents of abc123 session file > > If using NFS as the session store, you don't even have to get this specific > -- one > user using "his

Re: [SM-USERS] Load Balancing and session side effect

2005-04-28 Thread Tuc at Beach House
> On Thu, 2005-04-28 at 01:01, Jonathan Angliss wrote: > > > - User 1 logs in to webserver 1, gets session id abc123 > > - User 2 logs in to webserver 2, gets session id abc123 and trashes > > current contents of abc123 session file > > Can this happen? What is the probability of two diff

Re: [SM-USERS] Load Balancing and session side effect

2005-04-28 Thread Tomas Kuliavas
>> No, why? Since I've moved sessions to an NFS shared point that >> should be fine. No? > > You WILL get goofy behaviour with this due to NFS's lack of flock() > support. SQM > will work, but strange things will happen (messages being deleted from the > wrong > folder, for example) when sess

Re: [SM-USERS] Load Balancing and session side effect

2005-04-28 Thread Jonathan Angliss
Hello John Madden, On Thursday, April 28, 2005, you wrote: >> - User 1 logs in to webserver 1, gets session id abc123 >> >> - User 2 logs in to webserver 2, gets session id abc123 and trashes >> current contents of abc123 session file > If using NFS as the session store, you don't even ha

Re: [SM-USERS] Load Balancing and session side effect

2005-04-28 Thread John Madden
> Why would the database see it as any different from a single > server? The database doesn't. The multiple clients will get inconsistent views of the data stored within it, though. John -- John Madden UNIX Systems Engineer Ivy Tech State College [EMAIL PROTECTED]

Re: [SM-USERS] Load Balancing and session side effect

2005-04-28 Thread Tuc at Beach House
> > You WILL get goofy behaviour with this due to NFS's lack of flock() > > support. SQM > > will work, but strange things will happen (messages being deleted from the > > wrong > > folder, for example) > > I was going to say "that should never happen", but if one web server > clobbers another'

Re: [SM-USERS] Load Balancing and session side effect

2005-04-28 Thread Tuc at Beach House
> > > No, why? Since I've moved sessions to an NFS shared point that > > should be fine. No? > > You WILL get goofy behaviour with this due to NFS's lack of flock() support. > > SQM will work, but strange things will happen (messages being deleted from > the wrong folder, for example) when s

Re: [SM-USERS] Load Balancing and session side effect

2005-04-28 Thread Jonathan Angliss
Hello Rafael Martinez Guerrero, On Thursday, April 28, 2005, you wrote: > On Thu, 2005-04-28 at 01:01, Jonathan Angliss wrote: >> >> - User 1 logs in to webserver 1, gets session id abc123 >> >> - User 2 logs in to webserver 2, gets session id abc123 and trashes >> current contents of a

Re: [SM-USERS] Load Balancing and session side effect

2005-04-28 Thread Tuc at Beach House
> > > You forgot to provide list of installed plugins. SquirrelMail stock > plugins should not create this error. Remove all enabled plugins and > enable them one by one. > > >>> No plugins installed. > >> > >> what modifications are made in squirrelmail scripts? > >> >

Re: [SM-USERS] Load Balancing and session side effect

2005-04-28 Thread John Madden
> We do not want to use NFS for saving session data and there is anything > better than a database to keep data consistent. NFS should be fine with persistence, GFS should be fine all around, as long as PHP uses something that's NFS-safe for locking the files. For that matter though, if its loc

Re: [SM-USERS] Load Balancing and session side effect

2005-04-28 Thread John Madden
> Is this possible even with plain NFS if both servers point to the same > session store over NFS? I thought NFS was designed to avoid that. Is > the only solution to run NFS on top of something like GFS? What a hassle. Yes. However it is that PHP prevents multiple scripts from accessing the s

Re: [SM-USERS] Load Balancing and session side effect

2005-04-28 Thread John Madden
> No, not at all. Three consecutive request can be served by three > different webservers. So is there something in your SQL session handler (locking?) that prevents multiple servers from clashing? John -- John Madden UNIX Systems Engineer Ivy Tech State College [EMAIL PROTECTED]

Re: [SM-USERS] Load Balancing and session side effect

2005-04-28 Thread John Madden
> - User 1 logs in to webserver 1, gets session id abc123 > > - User 2 logs in to webserver 2, gets session id abc123 and trashes > current contents of abc123 session file If using NFS as the session store, you don't even have to get this specific -- one user using "his" session from two

Re: [SM-USERS] Load Balancing and session side effect

2005-04-28 Thread Rafael Martinez Guerrero
On Thu, 2005-04-28 at 01:01, Jonathan Angliss wrote: > > - User 1 logs in to webserver 1, gets session id abc123 > > - User 2 logs in to webserver 2, gets session id abc123 and trashes > current contents of abc123 session file > Can this happen? What is the probability of two different

Re: [SM-USERS] Load Balancing and session side effect

2005-04-28 Thread Rafael Martinez Guerrero
On Wed, 2005-04-27 at 23:57, p dont think wrote: > > > The only change in the SM code to save session data in a DB is a > > "require_once("db_sessions.php")" line in functions/global.php to > > include a file we have programed to define the > > "session_set_save_handler()" code used to access the

Re: [SM-USERS] Load Balancing and session side effect

2005-04-28 Thread Rafael Martinez Guerrero
On Thu, 2005-04-28 at 00:14, John Madden wrote: > > I don't think this has been raised before. You are looking for a > > database replacement for the attachments directory? I suppose there > > could be an option to upload files straight to the db as blobs or > > something, but thus far there has

Re: [SM-USERS] Load Balancing and session side effect

2005-04-28 Thread Rafael Martinez Guerrero
On Thu, 2005-04-28 at 00:11, John Madden wrote: > > We use LVS to access the webservers so we have full > > failover/redundancy/load balancing at webserver level. The database is > > working perfect but we need to do something with it if we want to have > > an automatic failover/redundancy at this

Re: [SM-USERS] Load Balancing and session side effect

2005-04-28 Thread Rafael Martinez Guerrero
On Wed, 2005-04-27 at 23:57, p dont think wrote: [..] > > [.] > > > > Hello > > > > We have a cluster of 4 linux servers running SM without problems. > > > > 3 webservers running apache/PHP/SM and a database server running > > postgreSQL for sessions/addressbooks/userprefs. > > > >

Re: [SM-USERS] Load Balancing and session side effect

2005-04-27 Thread p dont think
I was going to say "that should never happen", but if one web server clobbers another's session file with a new user, it is slightly possible, however you will never get the issue of you deleting a message in one of your folders, and it deleting a message in another. The code uses post variables to

Re: [SM-USERS] Load Balancing and session side effect

2005-04-27 Thread Jonathan Angliss
Hello John Madden, On Wednesday, April 27, 2005, you wrote: >> I was going to say "that should never happen", but if one web >> server clobbers another's session file with a new user, it is >> slightly possible, however you will never get the issue of you >> deleting a message in one of your folde

Re: [SM-USERS] Load Balancing and session side effect

2005-04-27 Thread John Madden
> I don't think this has been raised before. You are looking for a > database replacement for the attachments directory? I suppose there > could be an option to upload files straight to the db as blobs or > something, but thus far there has never been a need seen for this that I > am aware of. K

Re: [SM-USERS] Load Balancing and session side effect

2005-04-27 Thread John Madden
> We use LVS to access the webservers so we have full > failover/redundancy/load balancing at webserver level. The database is > working perfect but we need to do something with it if we want to have > an automatic failover/redundancy at this level too. Do you use LVS's persistence? John --

Re: [SM-USERS] Load Balancing and session side effect

2005-04-27 Thread p dont think
>>>At the very least, >>>establish persistence to your web servers on your load balancer so the >>>one-web-server-at-a-time can serialize requests to the PHP session as the >>>user >>>makes simultaneous requests. >> >>Do you have any pointers of where to go read about this? I'm

Re: [SM-USERS] Load Balancing and session side effect

2005-04-27 Thread Rafael Martinez
On Wed, 2005-04-27 at 12:46 -0700, p dont think wrote: [] > > At the very least, > > establish persistence to your web servers on your load balancer so the > > one-web-server-at-a-time can serialize requests to the PHP session as the > > user > > makes simultaneous requests. > > Do you ha

Re: [SM-USERS] Load Balancing and session side effect

2005-04-27 Thread John Madden
> I was going to say "that should never happen", but if one web server > clobbers another's session file with a new user, it is slightly > possible, however you will never get the issue of you deleting a > message in one of your folders, and it deleting a message in another. > The code uses post va

Re: [SM-USERS] Load Balancing and session side effect

2005-04-27 Thread John Madden
>> At the very least, >> establish persistence to your web servers on your load balancer so the >> one-web-server-at-a-time can serialize requests to the PHP session as the >> user >> makes simultaneous requests. > > Do you have any pointers of where to go read about this? I'm about to > start do

Re: [SM-USERS] Load Balancing and session side effect

2005-04-27 Thread Jonathan Angliss
Hello John Madden, On Wednesday, April 27, 2005, you wrote: >> No, why? Since I've moved sessions to an NFS shared point that >> should be fine. No? > You WILL get goofy behaviour with this due to NFS's lack of flock() support. > SQM > will work, but strange things will happen (messages b

Re: [SM-USERS] Load Balancing and session side effect

2005-04-27 Thread p dont think
John Madden wrote: No, why? Since I've moved sessions to an NFS shared point that should be fine. No? You WILL get goofy behaviour with this due to NFS's lack of flock() support. SQM will work, but strange things will happen (messages being deleted from the wrong folder, for example) whe

Re: [SM-USERS] Load Balancing and session side effect

2005-04-27 Thread John Madden
> No, why? Since I've moved sessions to an NFS shared point that > should be fine. No? You WILL get goofy behaviour with this due to NFS's lack of flock() support. SQM will work, but strange things will happen (messages being deleted from the wrong folder, for example) when sessions start

Re: [SM-USERS] Load Balancing and session side effect

2005-04-27 Thread Tomas Kuliavas
You forgot to provide list of installed plugins. SquirrelMail stock plugins should not create this error. Remove all enabled plugins and enable them one by one. >>> No plugins installed. >> >> what modifications are made in squirrelmail scripts? >> > None, fresh i

Re: [SM-USERS] Load Balancing and session side effect

2005-04-27 Thread Tuc at Beach House
> > >> > >> You forgot to provide list of installed plugins. SquirrelMail stock > >> plugins should not create this error. Remove all enabled plugins and > >> enable them one by one. > >> > > No plugins installed. > > what modifications are made in squirrelmail scripts? > None, fresh

Re: [SM-USERS] Load Balancing and session side effect

2005-04-27 Thread Tomas Kuliavas
>> >> You forgot to provide list of installed plugins. SquirrelMail stock >> plugins should not create this error. Remove all enabled plugins and >> enable them one by one. >> > No plugins installed. what modifications are made in squirrelmail scripts? have you considered storing sessions i

Re: [SM-USERS] Load Balancing and session side effect

2005-04-27 Thread Tuc at Beach House
> > You forgot to provide list of installed plugins. SquirrelMail stock > plugins should not create this error. Remove all enabled plugins and > enable them one by one. > No plugins installed. Tuc --- SF.Net email is s

Re: [SM-USERS] Load Balancing and session side effect

2005-04-27 Thread Tomas Kuliavas
> Hi, > > Trying to install from scratch a new Squirrelmail 1.4.4 and PHP > 4.3.11 from FreeBSD ports. I'm also trying to do it behind a load > balancer. > I've changed the session.save_path to a directory the two servers can see, > they are running lockd/statd... And I think I have it 99% wo

[SM-USERS] Load Balancing and session side effect

2005-04-26 Thread Tuc at Beach House
Hi, Trying to install from scratch a new Squirrelmail 1.4.4 and PHP 4.3.11 from FreeBSD ports. I'm also trying to do it behind a load balancer. I've changed the session.save_path to a directory the two servers can see, they are running lockd/statd... And I think I have it 99% working excep