View Full Version : Jabber Server Disconnection after 2 hours
srinivasan
06-23-2008, 07:33 AM
hi everybody,
We integrating jabber chat in our php APPLICATION for a quite while. Using jabber php classes we doing this.
While we doing this, we were getting disconnected after 2 hours.
We can't able to trace this.
Could you anyone sort out this one - please.
Thanks and Regards,
Srini
florian
06-23-2008, 10:38 AM
What server do you use?
srinivasan
06-23-2008, 02:15 PM
hi florian,
am using ejabberd server.
florian
06-23-2008, 10:24 PM
Right, is this your own server? Does this also occur with a regular client?
srinivasan
06-24-2008, 05:17 AM
We were using our own server.
Also, we not using any external third party client for the chat. We developing our own customized client for chat.
We just using class jabber for communication.
Jehan
06-24-2008, 10:12 AM
But you could make a test with a third party client, even though this is not the finality. You try with a client providing an xml console. And then you "spy" the communication. If you don't get disconnected, just look the difference between your own stream and the external client's one.
Anyway if you always get disconnected after 2 hours exactly, there is probably some kind of keep-alive in ejabberd. Is it 2 hours of inactivity? Or are you exchanging stuffs with the server but it eject you anyway? And how does it disconnect you? I mean, it probably send you a closing stream while doing so, and hopefully also a error (maybe meaningfull!). If so, what is this error?
Another method to diagnose, why don't you go and ask to the ejabberd guys (in parallel we can also search here for the answer)? Here the community website with links to forum, chatroom or ml: http://www.ejabberd.im/
And once you have your answer, come back here tell us. :-)
srinivasan
06-24-2008, 12:39 PM
tnx for your reply, I posted the same thread in the ejabberd forum too (today).
We will see any replies for this one. I will come back to this thread, once I found any answer.
srinivasan
06-30-2008, 02:54 PM
Hi jehan,
the disconnection issue is fixed (i hope so) because we had testing this for overs and it seems to be working without any disconnection.
We found that the script is timed out after every 30 seconds, so i included the set_time_limit(0) in the jabber running class function, which makes to run for ever until we supposed to break the jabber connection.
Thanks for your answers,
Srini
Note: Can you explain something about the PHP BOT - please.
Jehan
06-30-2008, 03:48 PM
Yes, it is the same for me, php functions time-out by default after 30 seconds. This is probably a default in php interpreter as this language is mostly used for displaying html (so of course if someone is waiting for this script to end before getting its page on the browser, 30 seconds would be very long. This timeout is then necessary on web servers for avoiding any bug bothering the users).
But if this is for a background php application, unlinked to a web page display, such timeout can obviously become an issue.
What is your question about php bot?
srinivasan
07-04-2008, 12:19 PM
Hello Jehan,
To know the current status of the logged user status (Live or Offline) and to know the other users status.
Whether we can achieve this by one login - the login which we used to connect the jabber server or we should use another login ( at the same time ) to get these details.
Also, how does we can handle the internet disconnection thing in the web application. It means if am logged into my web application - by the time i was logged into the jabber server too.
If suppose the internet is disconnected i need to reconnect the jabber server again once the internet is connected again.
How we can achieve this - am using php 4.x version and mysql 4.x version only.
Regarding the PHP bot - could you explain few words about this.
Thanks and Regards,
Srinivasan M
vBulletin® v3.8.0 Release Candidate 2, Copyright ©2000-2009, Jelsoft Enterprises Ltd.