Thank you for your reply. No anomalies in the logs. I’ll add a few details.
1 - My site runs on Joomla 6. I don’t have any logout issues. I only encounter problems when I try a connection between the site and the database: attempting to log in with a username, editing or saving an article, both in the backend and the frontend. In these cases I am not logged out; I end up on the calling page.
2 - I have an up‑to‑date copy of the site (Joomla 6) on localhost where I don’t have the problem.
3 - I created a subdomain that contains only a plain Joomla 6 installation, no extensions, with 2 users and 1 article. I have the same problem as on my production site.
4 - I sometimes get 404 errors when I click a link that queries the database to find the real hidden URL: I refresh the page and it works.
So my issues are indeed at the site‑database connection level, and support tells me it’s not their responsibility!!!
I recently helped someone who had a problem somewhat similar to yours.
The issue wasn't caused by OVH, but by a large number of site‑polluter connections.
These were saturating the total number of connections to the database.
A small .PHP script blocking these polluters solved the problem.
The IP address is always the same. It's the sub‑domain site that only contains Joomla – so it's not a defect of the site itself – and it serves me no purpose.
I will deactivate this site and see if it has any effect.
This second site (a subdomain of the main site) has been online for 2 years without any issues.
I only use it very rarely, for testing extensions, for example.
Its subdomain name is known only to two people, including me.
How could an “attacker” have found its URL? I don’t know. Why the subdomain? Maybe because its .htaccess is more basic than the production site’s...
I admit I don’t understand it either. But the fact is: since I disconnected my subdomain, I haven’t encountered any problems on the production site, whereas I used to have one in roughly one out of three transactions on average.