Bug #13630: GDBM writes frequently fail during heavy traffic.
| From: | cabel at panic dot com | Date: | Wed, 10 Oct 2001 19:57:00 +0000 |
| Subject: | Bug #13630: GDBM writes frequently fail during heavy traffic. | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-67715@lists.php.net to get a copy of this message | ||
From: cabel@panic.com
Operating system: RedHat 7.1
PHP version: 4.0.6
PHP Bug Type: DBM/DBA related
Bug description: GDBM writes frequently fail during heavy traffic.
We're using GDBM version 1.8.0, as of May 19, 1999. We have
a fairly active web site whichs pulls content from a GDBM
database.
Usually this access is read-only. Occasionally -- to update
a counter or information -- we need to open these databases
with write access.
A sample line to do this:
$dbm = dbmopen("facedb", "w");
Usually, this is never a problem. However, during heavy
load -- when more people than usual are updating data or
counters and thus needing to write to this database -- the
dbmopen() call fails with the following error:
"Warning: dbmopen_gdbm(itemsdb): 10 [Can't be writer], 11
[Resource temporarily unavailable] in db.php on line 5"
The PHP documentation page for dbmopen() states: "Note that
PHP does its own file locking in addition to any file
locking that may be done by the DBM library itself."
Is this true? If so, why would we be encountering this bug?
I guess the first question, which I might not be qualified
to answer: is this a GDBM problem, or a PHP problem?
Would switching to another database style help? Can we trap
this error and try again?
Enough question. That's my bug report.
-Cabel
--
Edit bug report at: http://bugs.php.net/?id=13630&edit=1