Troubleshooting Tag Provider Errors

I have a gateway tag provider that is consistently throwing write errors of the form:

[[default]Line Weld/SomeLine/_PLC Tags/STATUS] Error writing to OPC address 
[[kepware2]ns=2;s=SomeLine.SomeLine.STATUS]. Result code: [Bad_UserAccessDenied] User does not have permission 
to perform the requested operation.

I cannot locate where this attempted tag write is happening. Is there any way for me to track down the exact project/window/script that is throwing this error? Thanks!

Turn on the audit system.

Thanks, I just created a default auditor and configured one of the projects to use it!

However, I can’t seem to access the log. When I try navigating to the ‘view logs’ page I get an Internal Error.
When I try querying the AUDIT_EVENTS table, the DB just spins its wheels.

Have you ever encountered this?

Ew. Can you post the exception details?

The exception occurs when I go to Auditing->more->view log in the Gateway. The page hangs for a bit and then I’m greeted by a white screen that simply reads “Internal Error”. However, now I can’t reproduce that exact error screen, the page just keeps hanging.

I can see that the event log query was executed against the database, however it never returns a result after 3+ minutes:

It seems something has locked the table and never released it…