Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
TASK record creation/updation are failing with error message : java.sql.SQLException: Lock wait timeout exceeded - Support and Troubleshooting
  • >
  • Knowledge Base
  • >
  • Support and Troubleshooting (Knowledge Base)
  • >
  • TASK record creation/updation are failing with error message : java.sql.SQLException: Lock wait timeout exceeded
KB0753081

TASK record creation/updation are failing with error message : java.sql.SQLException: Lock wait timeout exceeded


2947 Views Last updated : Dec 16, 2024 public Copy Permalink
KB Summary by Now Assist

Issue

Symptoms

TASK record creation/updating are failing with following error message.

Lock wait timeout exceeded; try restarting transaction 
java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction 
at org.mariadb.jdbc.internal.SQLExceptionMapper.get(SQLExceptionMapper.java:149) 
at org.mariadb.jdbc.internal.SQLExceptionMapper.throwException(SQLExceptionMapper.java:106) 
at org.mariadb.jdbc.MySQLStatement.executeQueryEpilog(MySQLStatement.java:274) 
at org.mariadb.jdbc.MySQLStatement.execute(MySQLStatement.java:302) 
at org.mariadb.jdbc.MySQLStatement.execute(MySQLStatement.java:393) 
at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source) 
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
at java.lang.reflect.Method.invoke(Method.java:498) 
at com.glide.db.StatementWrapper.invoke(StatementWrapper.java:40) 

 

Cause

Due to Gap lock on 'task' table.

Gap Locks

A gap lock is a lock on a gap between index records, or a lock on the gap before the first or after the last index record. For example, SELECT c1 FROM t WHERE c1 BETWEEN 10 and 20 FOR UPDATE; prevents other transactions from inserting a value of 15 into column t.c1, whether or not there was already any such value in the column, because the gaps between all existing values in the range are locked.

A gap might span a single index value, multiple index values, or even be empty.

Gap locks are part of the tradeoff between performance and concurrency, and are used in some transaction isolation levels and not others.

 

Additional Information

InnoDB Lock MySQL

Release

All

Resolution

Add index or if index limit is reached , remove the least unused index and add new index for the affected column.

Please contact ServiceNow Customer Support.


The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.