Quota Counter table issue
search cancel

Quota Counter table issue

book

Article ID: 436140

calendar_today

Updated On:

Products

CA API Gateway

Issue/Introduction

Once the counter truncate job completes at midnight , we're seeing lot of 500 errors with message "Duplicate entry '<Key>' for key 'counters.countername'" & this seems to be happening everyday. can you please check and help get rid of these errors?

Environment

11.2

Cause

The "Duplicate entry" errors occurring after your midnight truncate job are caused by the Gateway's in-memory cache becoming out of sync with the database. The Gateway retains counter information in memory; when the table is cleared, the Gateway may attempt to write data that conflicts with its internal state.

Resolution

To resolve this, it is critical that each Gateway node is restarted immediately following the completion of the counters table purge. This ensures that the in-memory "Apply Throughput Quota" data is cleared and resynchronized with the new database state counter.ibd size huge.