Traccar 5.9 restarts several times during the day.

Cristian5 months ago

What version of S.O. do you have?

Antonio Junior5 months ago

Ubuntu 22.04 LTS

Antonio Junior5 months ago

I'm seriously considering making a backup and restoring the VPS.

Track-trace5 months ago

I thought why dont you make a backup of traccar server and the mysql database and then restore it on another vps to root out if the issue is with the OS or with traccar itself.

Antonio Junior5 months ago

Yes, I think I will do it, but the difficult part is changing the devices to the new IP, of course those that are not via the domain. but thanks for the information.

Track-trace5 months ago

I am missing some context about your issue. Did you already use this server for a longer with traccar 5.9 ? Was it running without issues before?

When did the problem actually occure, after updates of the OS, after changes to traccar server, without any changes?

P.s. you could just restore traccar server to another vps for the devices that use an url (to test it). Or you could add the devices to a group in your current server and use Group command to change the server ip.

Antonio Junior5 months ago

This server has been running for 4 weeks and has already been deployed with traccar 5.9. I've been using the VPS for some time and never had any problems, I think something may have failed in the update before installing traccar. Great suggestion from you to relocate devices. "you can simply restore the traccar server to another vps for the devices using a URL (to test it). Or you can add the devices to a group on your current server and use the Group command to change the server IP. " Perfect, thanks!

Antonio Junior5 months ago

@Track-trace @Anton
Greetings gentlemen, I carried out some tests simulating 250 devices connecting to traccar 5.9 every 10, 9, 8, 7, 6 and 5 seconds. When we have less than 8 seconds I receive two responses from the API as follows: This gets worse when I have the frontend logged in to an account with admin access, I did the test logged in with admin in more than 1 browser and it gets considerably worse. Ah, in relation to Memory and CPU, there was no spike at any point. 6GB RAM and 4CPU. Could you suggest something to work around please?

<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 502 Bad Gateway</title>
</head>
<body><h2>HTTP ERROR 502 Bad Gateway</h2>
<table>
<tr><th>URI:</th><td>/</td></tr>
<tr><th>STATUS:</th><td>502</td></tr>
<tr><th>MESSAGE:</th><td>Bad Gateway</td></tr>
<tr><th>SERVLET:</th><td>org.eclipse.jetty.proxy.AsyncProxyServlet$Transparent-72a0aab</td></tr>
</table>
<hr/><a href="https://eclipse.org/jetty">Powered by Jetty:// 11.0.15</a><hr/>

</body>
</html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 504 Gateway Timeout</title>
</head>
<body><h2>HTTP ERROR 504 Gateway Timeout</h2>
<table>
<tr><th>URI:</th><td>/</td></tr>
<tr><th>STATUS:</th><td>504</td></tr>
<tr><th>MESSAGE:</th><td>Gateway Timeout</td></tr>
<tr><th>SERVLET:</th><td>org.eclipse.jetty.proxy.AsyncProxyServlet$Transparent-72a0aab</td></tr>
</table>
<hr/><a href="https://eclipse.org/jetty">Powered by Jetty:// 11.0.15</a><hr/>
top - 16:40:14 up 15:32,  3 users,  load average: 1,65, 1,16, 1,62
Tasks: 157 total,   1 running, 156 sleeping,   0 stopped,   0 zombie
%Cpu(s):  3,0 us,  1,8 sy,  0,0 ni, 63,8 id, 30,7 wa,  0,0 hi,  0,3 si,  0,3 st
MiB Mem :   4471,5 total,    115,5 free,   2098,4 used,   2257,7 buff/cache
MiB Swap:   4096,0 total,   4094,7 free,      1,3 used.   2077,4 avail Mem 

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND                                                                                                                                
  16240 mysql     20   0 2901520 574144  37916 S   7,3  12,5   9:09.40 mysqld                                                                                                                                 
  45396 root      20   0 4939432 673044  21520 S   4,7  14,7   3:26.18 java                                                                                                                                   
  43014 junior    20   0 1067256 204228  44512 S   3,3   4,5   0:47.08 node                                                                                                                                   
  54331 root      20   0 1334484  96584  41316 S   2,0   2,1   0:02.25 node                                                                                                                                   
  43119 junior    20   0 1048120  77760  39528 S   1,0   1,7   0:28.20 node                                                                                                                                   
    320 root      20   0       0      0      0 D   0,3   0,0   0:09.09 jbd2/dm-0-8                                                                                                                            
  45960 junior    20   0   17984   9132   5800 S   0,3   0,2   0:08.79 sshd                                                                                                                                   
  46018 junior    20   0  990876 118512  41524 S   0,3   2,6   0:09.77 node                                                                                                                                   
  46066 junior    20   0  752640 170844  38608 S   0,3   3,7   0:08.57 node                                                                                                                                   
      1 root      20   0  167600  13392   8592 S   0,0   0,3   0:10.38 systemd                                                                                                                                
      2 root      20   0       0      0      0 S   0,0   0,0   0:00.10 kthreadd   
Anton Tananaev5 months ago

It seems like you're using wrong port for devices.

Antonio Junior5 months ago

@Anton I simulated with osmand protocol sending to 8082 because API recognizing protocol redirects to correct port? I captured the request through the traccar client app.

Anton Tananaev5 months ago

It proxies requests, but you shouldn't be using it. It adds unnecessary overhead. It was added because too many clueless people trying to use web port for devices.

Antonio Junior5 months ago

I understand, so should I simulate a specific one, such as 5023? because I don't know what else to do with this server having a problem. I didn't find anything that would cause traccar to reset. would it be the server bandwidth?

Anton Tananaev5 months ago

I only pointed out that you should use the correct port. Port for osmand protocol is 5055, not 8082, as you can see from the documentation. You should start by using the correct port.

Antonio Junior5 months ago

Ah you are correct Anton, sorry for the confusion.

Track-trace5 months ago

And let us know the results when doing the same test on port 5055 Antonio