Observations
When using MySQL or MariaDB databases with JS7, the History Service can report errors similar to the following in the JOC log files:
2026-05-07T12:01:29,266 WARN history-9-1 c.z.h.p.ProxyConnection
- HikariPool-3 - Connection org.mariadb.jdbc.Connection@117d5f0c
marked as broken because of SQLSTATE(08000), ErrorCode(-1)java.sql.SQLNonTransientConnectionException: (conn=6729) Socket error
Caused by: java.net.SocketException: Connection reset by peer
The History Service stops processing events and no further history information is written to the database.
Explanations
The root cause of this problem is an excessively large log file created by a job.
The JS7 History Service sends job log data to the MySQL or MariaDB database. If the transmitted data exceeds the database setting `max_allowed_packet`, then the database can close the connection initiated by the History Service.
The error message: Connection reset by peer: socket write error indicates that the database connection was closed while processing oversized job log data. Unlike other database systems that return a regular SQL error, MySQL and MariaDB can close the database connection if transmitted blob/clob data exceeds the configured packet size.
JS7 default settings currently use:
| Setting | Default Value |
|---|---|
| Applicable Log Size | 500 MB |
| Maximum Log Size | 1 GB |
These defaults are suitable for Oracle and SQL Server databases, but they can exceed the practical defaults commonly used by MySQL and MariaDB databases.
A frequent reason for oversized logs is unintended debug logging enabled in jobs.
Resolution
Step 1 — Skip the Offending Event (Immediate Workaround)
The immediate workaround is to increase the “last event id” stored in the database table JOC_VARIABLES.
Updating the stored Event ID allows the History Service to skip the offending events that resulted in oversized packets being sent to the MySQL or MariaDB server.
The corresponding row uses a NAME value similar to: history_<controller_id>
Example: history_controller_b2b
Update the TEXT_VALUE column with a later Event ID and restart the History Service from the JOC Cockpit Dashboard.
It is recommended to start with a small increment, for example by 50 events.
Example:
UPDATE JOC_VARIABLES
SET TEXT_VALUE = '<new_event_id>'
WHERE NAME = 'history_<controller_id>';If the error persists, then increase the Event ID again by another 50 events and restart the History Service again.
Care should be taken not to skip too many events because this can result in missing history entries and missing job logs.
Step 2 — Increase Database Packet Size
Increase the MySQL or MariaDB setting: max_allowed_packet
Example configuration:
[mysqld]
max_allowed_packet=50MDepending on the environment and expected log volume, larger values can be used.
After changing the setting, restart the MySQL or MariaDB service.
Step 3 — Reduce JS7 Log Size Limits
- Future JS7 releases will reduce the default values for acceptable job log sizes processed by the History Service to 50 MB
FEATURE AVAILABILITY STARTING FROM RELEASE 2.8.4
JOC-2225 - Getting issue details... STATUS
Current defaults:
| Setting | Current Default |
|---|---|
| Applicable Log Size | 500 MB |
| Maximum Log Size | 1 GB |
Recommended values for MySQL/MariaDB environments:
| Setting | Recommended Value |
|---|---|
| Applicable Log Size | 50 MB |
| Maximum Log Size | 50 MB |
This recommendation matches the practical defaults commonly used by MySQL and MariaDB databases and provides safer cross-database compatibility. Jobs that legitimately require larger logs will require these settings to be adjusted accordingly.