Fastcgi failing on mysql db selectrow_array error

Hi everyone,

First time installing RT, I’ve managed to successfully setup and run RT using rt-server.
However when I try to set it on fastcgi I’m stuck.

spawn-fcgi -u www-data -g www-data -a 127.0.0.1 -p 9000 – /opt/rt5/sbin/rt-server.fcgi

Exits correctly with a pid, but that pid immediately dies.
If I add the -n flag I see these errors:

spawn-fcgi -n -u www-data -g www-data -a 127.0.0.1 -p 9000 – /opt/rt5/sbin/rt-server.fcgi
[1263] [Fri Apr 9 17:00:30 2021] [warning]: DBD::mysql::db selectrow_array failed: fetch() without execute() at /opt/rt5/sbin/…/lib/RT/Handle.pm line 269. (/opt/rt5/sbin/…/lib/RT/Handle.pm:269)
[1263] [Fri Apr 9 17:00:30 2021] [critical]: DBD::mysql::db selectrow_array failed: fetch() without execute() at /opt/rt5/sbin/…/lib/RT/Handle.pm line 269. (/opt/rt5/sbin/…/lib/RT.pm:409)
DBD::mysql::db selectrow_array failed: fetch() without execute() at /opt/rt5/sbin/…/lib/RT/Handle.pm line 269.

and Of course nginx shows a 502 error on the site.
Anybody has a clue on how to tshoot?

These are my specs:

OS: Debian 8 Jessie
RT: 5
Mysql: 5.7

Thanks!