Sessions Problem, IP Related

WARPed

Joined: 2005-07-11
Posts: 4
Posted: Mon, 2005-07-11 11:38

Hello all,

I've managed to configure and run gallery successfully on my own webspace, I am now trying to do it for a small car club I am part of to allow us to show off our cars on their hosted server. I'm having a problem that i am positive is session related and before I speak to the hosters I would like your input.

Login's are unreliable. If I go to login sometimes it works sometimes it doesn't. Refreshing sometimes solves the issue. I have run a session test. The sessions do increment BUT it appears that two different IP's are responding as I refresh the page. The session ID is unchanged through all of this but as I refresh the number will increment as expected then suddenly the ip will change and a new number will start to increment. As i continure refreshing the ip hops from one IP to another (only two different addresses) and increments the number related to that IP. Like I say, incrementing is correct as long as it stays on one IP but as it hops between the two the id jumps up and down.

Any ideas what would cause this and what I need to say to my hoasting company?

Thanks in advance.
----
Gallery URL (optional but very useful): www.ukpoc.co.uk/gallery
Gallery version: 1.5
Apache version: ?
PHP version (don't just say PHP 4, please): 4.3.2
Graphics Toolkit: netpbm
Operating system: WinXP SP2 on home PC
Web browser/version (if applicable): IE 6.0.2900.2180.xpsp_sp2_gdr.050301-1519

 
WARPed

Joined: 2005-07-11
Posts: 4
Posted: Mon, 2005-07-11 11:57

This may also help:

session
Session Support enabled
Registered save handlers files user

Quote:
Directive Local Value Master Value
session.auto_start Off Off
session.bug_compat_42 On On
session.bug_compat_warn Off On
session.cache_expire 180 180
session.cache_limiter nocache nocache
session.cookie_domain no value no value
session.cookie_lifetime 0 0
session.cookie_path / /
session.cookie_secure Off Off
session.entropy_file no value no value
session.entropy_length 0 0
session.gc_divisor 100 100
session.gc_maxlifetime 1440 1440
session.gc_probability 1 1
session.name GallerySession PHPSESSID
session.referer_check no value no value
session.save_handler files files
session.save_path /tmp /tmp
session.serialize_handler php php
session.use_cookies On On
session.use_only_cookies Off Off
session.use_trans_sid Off Off

 
WARPed

Joined: 2005-07-11
Posts: 4
Posted: Tue, 2005-07-12 08:37

^ BUMP ^

 
Jordan_01002

Joined: 2005-02-14
Posts: 1535
Posted: Tue, 2005-07-12 10:31

I'd tell them just what you told us. My guess is they're doing some sort of clustering-type deal where your FQDN resolves to one of two IP addresses and gallery is getting confused if it changes servers mid-session.

 
fryfrog

Joined: 2002-10-30
Posts: 3236
Posted: Tue, 2005-07-12 11:33

If your hosting company is using a load balancer, then you might ask them about something like "sticky sessions" (thats probably almost certainly not what its called, but it might convey the idea). I think that most hardware load balancers will allow themselves to be configured in such a way that *all* requests from one ip/session/what ever you call it is handled by *one* server behind the load balancer. If they are using something simple like round-robin DNS, you might be able to just ask them to only use one IP for your site.

Both solutions are fairly big long shots, and having worked for a hosting company... I know that as an admin there I would probably have said "no" along with everyone else there. Its a slim chance, but you may as well take it. Another option is cancelation and moving to a host from the list of Web Hosting Referrals

 
WARPed

Joined: 2005-07-11
Posts: 4
Posted: Wed, 2005-07-13 08:16

Thanks for the reply guys. I did actually submit a support request with them while waiting to see what info could come from here. This is what they said:

Quote:
Sincere apologize for the delay getting back to you.
I have discussed about this with our technician and he suggest that on a
shared-server there may be many session processes running at the same time.
So, the session of your software maybe volatile or changing all the time. To
prevent the problem, there are some recommendations of using cookies to
collect the session data so that your session can be working properly.

You may have to modify some part of your code as this is the limitation of a
shared-server.

Sincere apologize for this inconvenience caused you.

Should you have any further problems, please feel free to contact us.

I'll speak to them about your suggestion fryfrog.

Thanks again.

 
littlejones

Joined: 2005-07-16
Posts: 20
Posted: Mon, 2005-07-18 22:40

I have this same problem, did you ever find a solution to the problem or get the host to make alterations for you?

 
fryfrog

Joined: 2002-10-30
Posts: 3236
Posted: Tue, 2005-07-19 00:04
Quote:
The session ID is unchanged through all of this but as I refresh the number will increment as expected then suddenly the ip will change and a new number will start to increment. As i continure refreshing the ip hops from one IP to another (only two different addresses) and increments the number related to that IP.

When you say the IP hops from one to the other, is it YOUR ip? Or is it the servers? That could make a big difference.

What did your host say about using a hardware load balancer? Do they or do they not? It should be easy enough for them to know, as it would be quite obvious as part of their setup or it wouldn't be. They certainly don't use round robin DNS, since an nslookup on your domain only returns one IP.

Their response *IF* they have a hardware load balancer sounds like they talked to someone who just barely didn't know what they were talking about. If they *DO NOT* have a hardware load balancer, it might be spot on.

I'd suggest posting the two IPs that its flip flopping between. Is one of them 84.22.161.186?

 
littlejones

Joined: 2005-07-16
Posts: 20
Posted: Tue, 2005-07-19 08:50

If you click the link below you can see whats happening, in my case the IP is hopping from 10.1.1.117 to 10.1.1.118 and like the guy above says once it hops it begins to increment again but from another number.

http://www.littlejones.co.uk/gallery/setup/session_test.php

If you can help thats much appreciated. My host is easyspace and they're not easy to contact as they avoid any email contact whatsoever. I was considering getting another domain with GoDaddy.com with a similar address as then I can host a forum and put gallery on there too, but then I can't guarantee I won't have this same problem with them!

Thanks.

 
Jordan_01002

Joined: 2005-02-14
Posts: 1535
Posted: Tue, 2005-07-19 10:28

GoDaddy doesn't play well with gallery. Do a search of the forums for that word and you'll see lots of complaints. If you're looking for a host primarily for gallery, check out the Web Hosting Referrals up on the top left of the page.

 
littlejones

Joined: 2005-07-16
Posts: 20
Posted: Tue, 2005-07-19 10:58

What a nuisance. I might just have to ditch gallery then because I can't afford expensive hosts, GoDaddy will cost me only about $3.99 a month and I get a database with that too which I don't with easyspace. Neither of them seem to work with Gallery anyhow so unless I can find a cheap host that will work then I'll have to come up with a new plan.

Thanks for your help,

 
fryfrog

Joined: 2002-10-30
Posts: 3236
Posted: Tue, 2005-07-19 12:22

Ah, I visted that link and I see what you mean. It has to be a badly configured load balancer, I don't see what else could do it.