General Error

This is where messages from the Administration are posted and place for questions on how to use the boards
Post Reply
User avatar
jemhouston
Posts: 6489
Joined: Fri Nov 18, 2022 12:38 am

General Error

Post by jemhouston »

Anyone else getting this message?


General Error
SQL ERROR [ mysqli ]

Operation not permitted [2002]

An sql error occurred while fetching this page. Please contact an administrator if this problem persists.
Micael
Posts: 7238
Joined: Thu Nov 17, 2022 10:50 am

Re: General Error

Post by Micael »

I’ve gotten it a handful of times over the last few days.
kdahm
Posts: 1791
Joined: Thu Feb 02, 2023 3:08 pm

Re: General Error

Post by kdahm »

Not gotten it.

Must have been promoted three steps from Major Error.
User avatar
Sukhoiman
Posts: 1139
Joined: Sun Nov 20, 2022 5:09 am

Re: General Error

Post by Sukhoiman »

Did get it a cpl times or so recently. Thx for bringing it up.

A refresh fixed it, so seems to be nominal issue for now (for some)....and maybe it self-resolves and/or stays nominal...

....but admins should have checklist ready if a database failure happens (again) along with standardized 3rd party place (that twitter page? I have as bookmark) to provide updates and such.
DanS MkII
Posts: 11
Joined: Fri Jun 23, 2023 11:49 am

Re: General Error

Post by DanS MkII »

I got it several times just now. So far, reloading the page (eventually) works.
Micael
Posts: 7238
Joined: Thu Nov 17, 2022 10:50 am

Re: General Error

Post by Micael »

Got it again just now after not having gotten it for a couple of days. Starting to think that there’s something off with the database.
Johnnie Lyle
Posts: 4051
Joined: Thu Nov 17, 2022 2:27 pm

Re: General Error

Post by Johnnie Lyle »

I get it occasionally. Refresh until it goes away.
pengolod_sc
Posts: 99
Joined: Thu Nov 17, 2022 12:07 pm

Re: General Error

Post by pengolod_sc »

I got it six times in short order just now, both for the main page, sub-fora, and topics- disappeared on refresh (although once it required two refreshes).
Belushi TD
Posts: 1869
Joined: Thu Nov 17, 2022 11:20 am

Re: General Error

Post by Belushi TD »

For the first time, I've been getting it.

And I've gotten it 30 or 40 times just reading today's new stuff.

Belushi TD
Lordroel
Posts: 1309
Joined: Thu Nov 17, 2022 10:49 am
Contact:

Re: General Error

Post by Lordroel »

Belushi TD wrote: ↑Thu Sep 24, 2026 12:41 pm For the first time, I've been getting it.

And I've gotten it 30 or 40 times just reading today's new stuff.

Belushi TD
Get this as well, if i want to post, edit, ore read.

General Error
SQL ERROR [ mysqli ]

Operation not permitted [2002]

An sql error occurred while fetching this page. Please contact an administrator if this problem persists.
Micael
Posts: 7238
Joined: Thu Nov 17, 2022 10:50 am

Re: General Error

Post by Micael »

I’ve gotten it a bunch today, as well as a CAPTCHA thingy a few times. Is there some heavy bot traffic at the moment perhaps?
Nik_SpeakerToCats
Posts: 2372
Joined: Sat Dec 10, 2022 10:56 am

Re: General Error

Post by Nik_SpeakerToCats »

The 'General Error' plus the 'Captcha'...

Got those this morning, but seems to have auto-resolved.

My 'provider' has not signalled any storm, but they tend not to mention such until fully resolved.

Hmm.
If you cannot see the wood for the trees, deploy LIDAR.
Micael
Posts: 7238
Joined: Thu Nov 17, 2022 10:50 am

Re: General Error

Post by Micael »

I asked Grok about this:
”**The error “SQL ERROR [ mysqli ] Operation not permitted [2002]” is a MySQL connection failure (error code 2002).** In this exact wording, it is most commonly caused by the hosting provider rate-limiting new database connections.<grok:render card_id=“124e93” card_type=“citation_card” type=“render_inline_citation”><argument name="citation_id">0</argument></grok:render>

### Most likely cause (especially if it happens frequently)

Many shared hosts (notably Hostinger, and similar providers) enforce a strict limit on *new* MySQL connections per second (often around 20).

phpBB (and many PHP applications) typically open a fresh database connection on every page request. Under traffic spikes, bots, multiple concurrent users, or even aggressive page loading, the site exceeds the limit. The host then blocks further connection attempts, producing exactly this error:
`SQLSTATE[HY000] [2002] Operation not permitted` / “Operation not permitted [2002]”.<grok:render card_id=“f51599” card_type=“citation_card” type=“render_inline_citation”><argument name="citation_id">15</argument></grok:render>

This matches the intermittent / frequent nature you described better than a permanent configuration problem.

### Other possible causes of error 2002

- MySQL/MariaDB server is down, overloaded, or restarting.
- Incorrect host in `config.php` (e.g., `localhost` vs `127.0.0.1` or the real hostname, or wrong socket/port). Using `localhost` often tries a Unix socket that may be unavailable or restricted.
- Temporary resource exhaustion, firewall/SELinux restrictions, or permission issues on the MySQL socket.
- Less commonly, PHP open_basedir or other security restrictions interfering with the connection.

### What to do

1. **Contact your host first** — Tell them you are seeing “Operation not permitted [2002]” and ask whether they apply a MySQL connection rate limit. They can confirm and may temporarily raise it or advise on persistent connections.
2. **Enable persistent connections** (the usual fix for the rate-limit case):
In phpBB’s `config.php`, change the database host from something like
`$dbhost = 'localhost';`
to
`$dbhost = 'p:localhost';`
(the `p:` prefix tells PHP’s mysqli to use a persistent connection).
Test carefully; persistent connections can have side-effects on some hosts.
3. **Other quick checks**:
- Verify `$dbhost`, `$dbport`, `$dbname`, `$dbuser`, and `$dbpasswd` in `config.php`.
- Try switching between `localhost` and `127.0.0.1` (or the hostname your host recommends).
- Ensure the MySQL service is running and check the host’s status/error logs.
- Review server resource usage and any recent traffic spikes or bot activity.

If the problem continues after the above, provide the exact host, phpBB version, and any recent changes (upgrades, traffic increase, etc.) for more targeted advice. The core issue is almost always a failure to establish a MySQL connection rather than a problem inside phpBB’s SQL queries themselves.”
Lordroel
Posts: 1309
Joined: Thu Nov 17, 2022 10:49 am
Contact:

Re: General Error

Post by Lordroel »

so you are saying we might had yesterday a masive bot atack.
Post Reply