-
Notifications
You must be signed in to change notification settings - Fork 581
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Server Is Freezing after 3-4 days #91
Comments
When you access, do you mean Microsoft Access or access logs? n |
No, I mean access log |
I really don't know what's causing it. I'm pretty sure it's not a problem with GpsTracker. I would try asking on https://serverfault.com. Did you try some of the suggestions that they gave? n |
@nickfox, I can't solve this problem.. but I'm thinking that this error is because server is create multiples clients to the same client... for example, I have only 10 cars registered in my server but server is showing mire than 400 connections in socket echo and sometimes I got the error telling that the resource of client XX was not found, something link this... I realize too that gpstrackerxy.com (coban page) if I send to them ##,imei:XXXXX,A or just imei number the connection is closed from the server. They only allow the info with gps data like lat,long,time,speed, etc. How can i prevent create muliples clients to socket server? Maybe this can help me. I have already tried to remove the load and on responses but clients connect to the server but do not receives data from client |
Brent suggested changing the timeout value to something shorter in the stream_select function in line 23 of tk103-server.php. That may lessen the number of sockets that are remaining open. Experiment with that. n |
@nickfox what value do you suggest? Something like 10, 100, 1000?? |
experiment. :o) n |
@nickfox I realize that when I set the timeout value with a shorter number... server works just for some seconds and freezes. For example e set as timeout 10000 and after 3 minutes server freezes. How shorter is the number, faster server freezes. If I ser number longer, like 3000000000 server is working for 3-4 days and freezes... there a value that correspond to infinite value? I know that cant be ser 0 as value... server din't start |
You should post this question on stackoverflow if you haven't done so already. Socket programming is pretty specialized. You should be able to find some experts there. |
@nickfox I solved the problem... It was because I was using wamp and for some unknow reason server was freezing after some hours... Now I'm using XAMPP and it's working greatly... I just want o know 1 thing more, to not open another issue, how can I send an specific command to all users connected to the server? For example i want to send a message changing ip address from server to all clients connected, how can i do that... I tried to change fwrite($client_sockets, $response2); but is not working.. |
Good, glad it's working. My first guess is you need to create a loop that goes through your collection of sockets and write to each socket. Try adding fwrite($socket, "test"); somewhere about line 50 in the socket server and see what happens. n |
@nickfox thanks for help but didn't works... I'm using this code to send message to all connected trackers: But after long time of server job this look like is stopping because invalid connections are set to server... I'm needing to send message to all trackers because I created in my site a command to block car and resume car by website, and to send this command I'm using the client page you created to connect to socket server and send data with command armcar, when server get this command it sends to all clients (because I don't know how to send to specific tracker) the command K (to cut car). Can you help me? |
Hi Nick and other friends, I'm facing some problems... My server is freezing after some days of regular work. I realize that after some days (3-4 days) my server freezes and in the log I got the code 408 in access.
I googled but didn't find anything to solve the problem, can someone here help me?
I'm using Mozila Firefox + WAMPServer in my computer as SockerServer...
Since now thanks!
The text was updated successfully, but these errors were encountered: