Error Communication Failure

Karlosvalenzuela2 years ago

Good evening, I get this error when generating reports repeatedly, and it does not generate the requested route. If someone can help me solve this, I thank you in advance.

this appears in logs

ERROR: An I/O error has occurred while writing a response message entity to the container output stream. - java.io.IOException: java.util.concurrent.TimeoutException: Idle timeout expired: 30000/30000 ms - MappableException (...)

and also

HikariPoll-1 - Connection is not available, request timed out after 30000ms. - 
SQLTransientConnectionException(... < QueryBuilder:59 < *:135 <
Anton Tananaev2 years ago

The error seems to be pretty self-explanatory. Potential solutions:

  1. Make your database faster
  2. Increase database timeout
  3. Request less data
Karlosvalenzuela2 years ago

excuse my ignorance, could you help me how to do it please

Anton Tananaev2 years ago

Which option do you want to go with?

Karlosvalenzuela2 years ago

THE 1 OR THE 3

Anton Tananaev2 years ago

For the first one - get better hardware. Third one - what is not clear about this one exactly?

Karlosvalenzuela2 years ago

It is installed on a VPS with good hardware, but when I generate a report like this, be it in a range of 1 hour, it takes a long time and that error appears, I have MYSQL 8.0,

How can I increase the waiting time?

Why does this happen if this? I still generated a report of a day that there is no data, it still takes time and that error appears or it remains empty

Karlosvalenzuela2 years ago

https://ibb.co/TrbvGf4

I get this when I put the htop command and generate a report

Track-trace2 years ago
Track-trace2 years ago

For simple questions as on how to increase the mysql database timeout you can just do a google search.

https://docs.rackspace.com/support/how-to/how-to-change-the-mysql-timeout-on-a-server/

Track-trace2 years ago

More about timeout: Use the search option on Traccar forum

https://www.traccar.org/forums/topic/hikaripool-1-timeout/

But actually i would check what kind of storage your VPS uses.. When it is Harddisk then it will be much slower then SSD or Nvme SSD which would be a good idear to upgrade.

Karlosvalenzuela2 years ago

Hello, a question, how do I do this, please? i have 8gb ram

Add custom configuration file:

nano /etc/mysql/mysql.conf.d/custom.cnf

An example for a server with 3GB of RAM:

[mysqld]
innodb_buffer_pool_size = 2G
innodb_log_file_size = 512M
innodb_flush_method = O_DIRECT
innodb_flush_log_at_trx_commit = 0
Track-trace2 years ago

Add those innodb lines to your Mysql cnf file and restart Mysql.

Karlosvalenzuela2 years ago

I have 8 GB of ram, do I put it the same as it says?

so or change something?

[mysqld]
innodb_buffer_pool_size = 2G
innodb_log_file_size = 512M
innodb_flush_method = O_DIRECT
innodb_flush_log_at_trx_commit = 0