DB Error: Duplicate entry 'xxxxxx' for key 'sessions_pkey'

I am currently running into some issues deploying OJS (3.1.1.2) on a client server.

OJS runs flawlessly on my DigitalOcean Stagingserver (running PHP 7.2.1), but breaks after a successful installation on the client’s server (running PHP 7.1.19) with a “DB Error: Duplicate entry ‘XXX’ for key ‘sessions_pkey’” error.

As some other users already ran into that problem, i have tried some of the solutions provided here (DB Error: Duplicate entry 'NULL' for key 'sessions_user_id' php 5.5 instead of 5.6 - #6 by stinkjyo) and here (DB Error: Duplicate entry 'xxxxxx' for key 'sessions_pkey' - #16 by asmecher), but to no avail. The session.auto_start is disabled as well.

After truncating the session table, the site loads (until another reload or link happens), but the default theme is broken as well. If is set the session_cookie_path to e.g. /home/XYZ/webdir, the default theme loads properly, but the login just redirects me back to the index page after i have entered my credentials (and doesn’t seem to recognize the sessioncookie)

Thanks in advance.

15
42