Solved: SeaTable API suddently can't querry SQL requests (runtime error: invalid memory address or nil pointer dereference)

I’m running the latest version of SeaTable, and using such a SQL query very often. Sadly, every query to [url]/dtable-db/api/v1/query/[base_id] returns bad gateway 502 for me. SeaTables logs in “dtable-db.error.log” shows this error:

2022/10/23 03:31:55 [error] 35#35: *123 upstream prematurely closed connection while reading response header from upstream, client: 172.25.0.1, server: [correct url], request: "POST /dtable-db/api/v1/query/[correct base id]/ HTTP/1.1", upstream: "http://127.0.0.1:7777/api/v1/query/[correct base id]/", host: "[correct host]"

Such a query worked until 3am this morning, and I wasn’t able to fix it and get them running ever since. Our internal tools rely on this method, any help from all of you would be appreciated. In addition to this, other api querys are working, I can normally create, delete or update rows and links etc.

Thank you for reading this :slight_smile:

I’ve taken a second look at it and realized that I only shared the nginx log and not the seatable log.
The seatable log shows a bit more errors which I can’t even interprete exept of this repeating line:

2022/10/23 12:12:39 http: panic serving 127.0.0.1:47928: runtime error: invalid memory address or nil pointer dereference

Hope that helps somehow.

Further testing revealed that this behaviour is only specific to ONE certain base, while ALL the other bases are working fine.

Even further testing revealed that this function caused the dtable-db api to stop working:

if({FIELD-A}, subtract(substitute({FIELD-B}, ",", ".", 1), substitute({FIELD-A}, ",", ".", 1)))

Removing this function instantly restored full functionality. Marking this as solved.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.