Skip to content
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

Just a question #96

Open
deccosantos opened this issue Mar 19, 2018 · 15 comments
Open

Just a question #96

deccosantos opened this issue Mar 19, 2018 · 15 comments
Assignees

Comments

@deccosantos
Copy link

Hi everyone, i'm using this server and this is great, but i'm facing some problems and i didn't find any answer even in stackoverflow.

So my problem is that now i have about 150 vehicles in the server, and after some time the server hangs and stop to send responses back to client and after some time closes port.

I'm using xampp in a windows server 2012 I just want to know if, and what, changes in php.ini and apache.conf should i do to keep alive server?

I think that the problem is in fread, because if a set fread to 128 as example server hangs fastly than if a set fread to 1024 or 2048.

Since now thanks to all who helps me!

@nickfox
Copy link
Owner

nickfox commented Mar 19, 2018

Have you created indexes in the database?

@deccosantos
Copy link
Author

@nickfox no, but I'm not doing a select from database, just insert, even so i need to create indexes? Remembering that when server hangs no erro is shown in log even in mysql log

@brentfraser
Copy link
Collaborator

check the web server log (apache?)

@brentfraser
Copy link
Collaborator

Perhaps PHP is not a good choice for this socket-oriented server script.

@brentfraser
Copy link
Collaborator

It could be that one of the vehicle devices has not implemented the protocol properly. Are they all the same?

@deccosantos
Copy link
Author

in the apache log there is no erros, all the trackers are the same, the problem maybe is with the fread or something in the config of php

@deccosantos
Copy link
Author

i know php shoukd not be the best, but it works for nick

@brentfraser
Copy link
Collaborator

We haven't tested with 150 devices so feel free to use s different language. I saw Stack overflow message saying Node.js has good socket functions. https://stackoverflow.com/questions/23741634/php-socket-server-hangs

@deccosantos
Copy link
Author

@nickfox the problem is not with database or mysql... I remove from my server all mysql functions and still hangs...

@nickfox
Copy link
Owner

nickfox commented Mar 20, 2018

Try a different server. I use nginx on ubuntu. It is hosted by linode.com. Or else find someone with expertise using the server you have.

@nickfox
Copy link
Owner

nickfox commented Apr 5, 2018

Did you figure it out?

n

@deccosantos
Copy link
Author

@nickfox i changed all my server to Nodejs and the problem never more happens, this was my resolution!

@nickfox
Copy link
Owner

nickfox commented Apr 6, 2018

Excellent. Good job.

n

@Helen300
Copy link

Could you show us how you changed all your server to nodejs? @deccosantos

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants