[Solved]Error 503 One out of three

A place for users and developers of the Xataface to discuss and receive support.

[Solved]Error 503 One out of three

Postby silma » Fri Oct 19, 2012 3:08 am

Hello Steve, hello everyone,

I encounter an unexpected problem with a tiny app, and i'm stuck.


The app works well in WAMP on my machine.

When i put it online on a shared hosting server I change:
- the session path in the index.php => /tmp
- the database path

Here the trouble :
Two out of tree, the app works as expected
One out of three, it never load, and finish with a 503 error after 300 seconds.
The message is :
Error 503 Service Unavailable
Service Unavailable
Guru Meditation: XID: 1678726856
Varnish cache server


I asked my hosting services before posting here,and they told me i'm the only user with this kind of trouble at the moment.

It seems (but i'm not sure about it) that when i empty the /tmp directory OR/AND when the browser cache is empty, the error occurs less.

I use Xataface 1.3.2.

If you want to try you can see it happen (or not...)here.

Any idea would be welcome.
(Do not hesitate to ask for clarification ; i hope my english is not too incomprehensible)



Thanks a lot.
Last edited by silma on Sun Oct 21, 2012 8:55 am, edited 1 time in total.
silma
 
Posts: 87
Joined: Tue Apr 28, 2009 11:47 pm

Re: Error 503 One out of three

Postby shannah » Fri Oct 19, 2012 8:02 am

Not sure what would cause this. I tried your link and then refreshed about 20 times. It seemed to load quickly each time.
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: Error 503 One out of three

Postby silma » Fri Oct 19, 2012 9:00 am

You right, it seems to works now.
My hosting services must have done someting... I'll investigate before mark this one as solved.

Thanks for trying !
silma
 
Posts: 87
Joined: Tue Apr 28, 2009 11:47 pm

Re: Error 503 One out of three

Postby silma » Sat Oct 20, 2012 6:53 am

Hello again,

It was not my hosting services doing, and the error was back this morning.
I emptied the /tmp directory, and after a few minutes (5/10) everythings seems to works.

I was quite surprised by the way : i had 1500+ sessions stored, since yesterday ? (i already emptied it yesterday).
I can make something to empty the tmp directory on a regular basis , but i'm sure it's not the way it should works.

What can go wrong with my sessions ?

Thanks for the help.
silma
 
Posts: 87
Joined: Tue Apr 28, 2009 11:47 pm

Re: Error 503 One out of three

Postby shannah » Sat Oct 20, 2012 8:44 am

Xataface does start a session for all connections. If you haven't specified a long timeout these should be garbage collected every 20 minutes or so. In 2.0 I have added a setting to disable sessions until the user tries to log in... I'll have to refer to my notes to remember what setting that is and whether it has been back ported to 1.3.x

Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: Error 503 One out of three

Postby silma » Sat Oct 20, 2012 9:50 am

I could retrieve 2.0 for the svn, too.
I'll just need an hint on how to disable the sessions.
(Most of user will never log in)
silma
 
Posts: 87
Joined: Tue Apr 28, 2009 11:47 pm

Re: [Solved]Error 503 One out of three

Postby silma » Sun Oct 21, 2012 9:05 am

I finally resolved the mystery... and of course, it was my fault, and the framework as nothing to do with it :oops:

On this app, i had a "complex" view used as a tab, and it take too much time to generate, so it slow down the database, that slow down eveything else.

I still dont know why i have thousands of sessions file, but it must be related somehow.

Anyway, thanks a lot for your help, with all my apologies.
silma
 
Posts: 87
Joined: Tue Apr 28, 2009 11:47 pm

Re: [Solved]Error 503 One out of three

Postby shannah » Fri Oct 26, 2012 8:02 am

Just checked the source and in 2.0 sessions are not created until the user tries to log in - sessions can be turned on if the application requires it, but this solves the thousands of session files for the most part.

On 1.3.x it creates a session for every user whether logged in or not. This can build up a lot of session files, but if you keep the session timeout and session garbage collection settings to reasonable levels, it should keep these under wraps. This page has a good description of the garbage collection settings:
http://www.appnovation.com/session-garb ... ection-php

-Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: [Solved]Error 503 One out of three

Postby silma » Sun Oct 28, 2012 2:08 am

Thanks a lot Steve, i think i'll use this app to try the new 2.0.
silma
 
Posts: 87
Joined: Tue Apr 28, 2009 11:47 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 39 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved