Happy Business Starts Here

Gateway Timeout error received when Cancelling invoice with too many charge lines

Highlighted
Support SME

Gateway Timeout error received when Cancelling invoice with too many charge lines

Use Case: Client mistakenly created an invoice, but when trying to cancel it via UI or API, it times out. 

 

Sample error received:

 

Gateway Timeout

The proxy server did not receive a timely response from the upstream server.
Reference #1.0xxxxxx.xxxxx.xxxx

 

 

Sample gack logs contain the following:

Exception Class : com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException
Shard : zapps11
HTTP Method : POST
...
Parameters:
method=cancel
id=[]
invcomments=
invoice_number=
invoiceFileId=
csrfToken=[]
Stack Trace:
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Communications link failure during rollback(). Transaction resolution unknown.
...
action.JDBCTransaction.rollback(JDBCTransaction.java:162)
[wrapped] org.hibernate.TransactionException: JDBC rollback failed
at ..
[wrapped] org.springframework.transaction.TransactionSystemException: Could not roll back Hibernate transaction; nested exception is ...

 






If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Support SME

Re: Gateway Timeout error received when Cancelling invoice with too many charge lines

Resolution:

This would typically occur if the subscription included in the invoice contains too many amendments or charge segments to roll back, that the cancellation action goes beyond the threshold time of 120 seconds.

 

As a suggested workaround, perform the following
1. Create a bill run specific for the account.
2. Make sure the Bill Run is NOT set to auto-post the invoice.
3. Set the target date same as the original invoice
4. Once Bill Run completed, cancel that bill run and that should asynchronously cascade cancellation of invoice.






If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √

View solution in original post

1 REPLY 1
Highlighted
Support SME

Re: Gateway Timeout error received when Cancelling invoice with too many charge lines

Resolution:

This would typically occur if the subscription included in the invoice contains too many amendments or charge segments to roll back, that the cancellation action goes beyond the threshold time of 120 seconds.

 

As a suggested workaround, perform the following
1. Create a bill run specific for the account.
2. Make sure the Bill Run is NOT set to auto-post the invoice.
3. Set the target date same as the original invoice
4. Once Bill Run completed, cancel that bill run and that should asynchronously cascade cancellation of invoice.






If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √

View solution in original post