Facing api issue

shivam2 years ago

Hi,
I'm facing issue in api,
Error: https://drive.google.com/file/d/1cUguoc3EnDTUeIGmf3PwJpyhmizpilWP/view?usp=sharing
Facing issue in reports while using custom android application

Index 0 out of bounds for length 0 - IndexOutOfBoundsException (... < ReportUtils:199 < TripsReportProvider:106 < ReportResource:275 < ...)
shivam2 years ago

Hi,
Above issue has been resolved but now i'm facing a new issue,
Some devices are getting fluctuate after reaching mysql Network traffic since startup: 1.1 GiB so to resolving this i'm restarting the traccar service again and again,
Can you please let me know what i can do to resolve this at permanent basis

Anton Tananaev2 years ago

Why do you need to restart? What's the issue with devices?

shivam2 years ago

Hi,
After some times of interval some of our running devices are showing online/offline frequently by self and it is not working fine when ever we are not restarting the traccar and mysql server.

Anton Tananaev2 years ago

Maybe you just don't have enough resources allocated on the server? It doesn't really happen on any of our servers.

shivam2 years ago

HI,
I'm using ubuntu os with 8 GB Ram and 30 GB SSD and 2 CPU and we are using 250 gps devices.
Can you please let me know it is sufficient or not ?

Anton Tananaev2 years ago

Your disk space seems really small for 250 devices. How frequently are they reporting?

shivam2 years ago

Hi,
OK, At the interval of 10-10 seconds devices are reporting
And after restart the mysql and traccar server all the devices are working fine and server is using 50% only of our ssd

Anton Tananaev2 years ago

Number of CPU cores also seems low. RAM should be enough, but depends on how you allocated it between Traccar and the database.

shivam2 years ago

Hi,
CPU core is 2 but as we noticed server is also not using the cpu above 20-25% and we have allocated the 4 GB RAM to the mysql server, can you please let me know how can i specify the ram for traccar also ?
or i need to just increase the resources of hole server ?
if i need to increase the resources then plz help me with the sufficient value for the resources

And you can find the issue here: https://drive.google.com/file/d/1CN2x9ArIQVNqaeALQWDPQFy5LakCVjRS/view?usp=sharing

Anton Tananaev2 years ago

It sounds like it should be working fine. Have you actually checked the logs to see what's happening?

shivam2 years ago

HI,
Here are the logs:

2022-10-23 18:48:09  INFO: [Tf5364ab2] error - Connection reset - SocketException (...)
2022-10-23 18:48:09  INFO: [Tf5364ab2] disconnected
2022-10-23 18:48:09  INFO: [T7150f62e] id: 355172105573651, time: 2022-10-23 18:03:13, lat: 25.64944, lon: 85.09956, course: 123.0
2022-10-23 18:48:09  INFO: [Td52e1f3e: gt06 < 223.180.224.167] 78780a130406040002095973070d0a
2022-10-23 18:48:09  INFO: [Td52e1f3e: gt06 > 223.180.224.167] 787805130959e0240d0a
2022-10-23 18:48:09  INFO: [Td52e1f3e] id: 355172105577579, time: 2022-10-23 17:30:04, lat: 26.09532, lon: 85.39173, course: 291.0
2022-10-23 18:48:10  INFO: [Tb83f92c2: gps103 < 42.110.131.127] 3836343138303033303932393433393b
2022-10-23 18:48:10  INFO: [Tb83f92c2: gps103 > 42.110.131.127] 4f4e
2022-10-23 18:48:10  INFO: [T7150f62e: gt06 < 223.180.224.160] 7979000894000516031bb3000d0a
2022-10-23 18:48:10  INFO: [T7150f62e] id: 355172105573651, time: 2022-10-23 18:03:13, lat: 25.64944, lon: 85.09956, course: 123.0
2022-10-23 18:48:11  INFO: [T0820948c: gt06 < 223.180.224.163] 78782622160a170d1209cf02cafd3c092770701f145d019534073b00c6d9010000013261de0091ddfd0d0a
2022-10-23 18:48:11  INFO: [T0820948c: gt06 > 223.180.224.163] 787805220091a10a0d0a
2022-10-23 18:48:11  INFO: [T0820948c] id: 355172102623939, time: 2022-10-23 18:48:09, lat: 26.03196, lon: 85.32202, speed: 16.7, course: 93.0
2022-10-23 18:48:11  INFO: [T6af703b9: gt06 < 223.180.224.179] 78780a13040604000202775fd30d0a
2022-10-23 18:48:11  INFO: [T6af703b9: gt06 > 223.180.224.179] 787805130277ccf00d0a
2022-10-23 18:48:11  INFO: [T6af703b9] id: 355172106062134, time: 2022-10-23 17:28:42, lat: 26.09533, lon: 85.39170, course: 280.0
2022-10-23 18:48:11  INFO: [T6af703b9] error - Connection reset - SocketException (...)
2022-10-23 18:48:11  INFO: [T6af703b9] disconnected
Anton Tananaev2 years ago

Have you done the optimization? Maybe you're getting to the limit on number of open connections.

shivam2 years ago

HI,
As we checked the limit for open connection in mysql is 150,
should i update it ?
and here is my custom file of mysql:

mysqld]
innodb_buffer_pool_size = 4G
innodb_log_file_size = 2G
innodb_flush_method = O_DIRECT
innodb_flush_log_at_trx_commit = 0
Anton Tananaev2 years ago

I'm talking about overall network connections.