MongoDB 64-bit crashing PHP on saving to GridFS

38 views
Skip to first unread message

Dan

unread,
Mar 24, 2012, 10:53:03 AM3/24/12
to mongodb-user
Hey,

I had raised a post about this on stack overflow (http://
stackoverflow.com/questions/9852028/mongodb-crashing-php-on-file-
save-500-error-can-retrieve-file-saved-without-is) but thought I might
post here to see if there is anyone here who has experienced a similar
issue.

Basically, when I save a new file into the Mongo GridFS, it seems to
save, but then PHP crashes and I get a 500 error (doing this via a
POST using the lithium framework). However when I read the file, it is
fine on retrieving it. It is also fine at getting and saving normal
records that aren't files.

I'm at a bit of a loss at why this might be. I tried using an older
version of Mongo and had the same issue. However I do have the system
working fine on another system using a 32-bit version of Mongo;
however I can't use that for my production server as I need the extra
space the 64-bit provides.

Could anyone suggest something I may have missed in setting it up? Or
anything that might help? I'm at a bit of a loss right now with it, so
any help is really appreciated.

Thanks!

Dan

Eliot Horowitz

unread,
Mar 24, 2012, 10:12:27 PM3/24/12
to mongod...@googlegroups.com
What version of the PHP driver?
How big is the file?
Is there a stack trace?

> --
> You received this message because you are subscribed to the Google Groups "mongodb-user" group.
> To post to this group, send email to mongod...@googlegroups.com.
> To unsubscribe from this group, send email to mongodb-user...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.
>

Timothy Hawkins

unread,
Mar 25, 2012, 3:45:37 AM3/25/12
to mongod...@googlegroups.com, mongod...@googlegroups.com
I have the same problem with 1.2.8, and 1.2.9

Revert to 1.2.7 that one works.

Our app uses gridfs a lot, and does a lot of writes, it wont work on these two versions.

Sent from my iPad

Derick Rethans

unread,
Mar 25, 2012, 7:49:25 AM3/25/12
to mongod...@googlegroups.com
On Sun, 25 Mar 2012, Timothy Hawkins wrote:

> I have the same problem with 1.2.8, and 1.2.9
>
> Revert to 1.2.7 that one works.
>
> Our app uses gridfs a lot, and does a lot of writes, it wont work on
> these two versions.

There were some issues in the 1.2.8 and 1.2.9 release which I think
we've addressed on github already. We'll probably see a release of that
in the next two weeks. I would suggest you try to the one on github
(make sure you use the v1.2 branch though). It's at
https://github.com/mongodb/mongo-php-driver

Let me know if you need some help trying that out.

cheers,
Derick

--
http://mongodb.org | http://derickrethans.nl
twitter: @derickr and @mongodb

Timothy Hawkins

unread,
Mar 25, 2012, 7:51:29 AM3/25/12
to mongod...@googlegroups.com, mongod...@googlegroups.com
Ahhh, ok, sorry a bit tired, been coding for 9 hours straight.

On the plus side i built an automatic user interest tracking system, and hooked it onto the related items in mysoc, See my last mail.

Sent from my iPad

Timothy Hawkins

unread,
Mar 25, 2012, 7:56:38 AM3/25/12
to mongod...@googlegroups.com, mongod...@googlegroups.com
I tried the git hub 1.2 branch about a week ago, and still had the same problem, it was characterised by an exception being thrown and abrting the apache request thread whenever the savebytes gfs call was made.

Note: most distros such as ubuntu and fedora are currently shipping the broken 1.2.9 as default, i have Had to uninstall it and then install 1.2.7 from pecl to stop it breaking my systems each time i updated my dev workstation.

my app uses gfs to store dynamically generated thumbnails of images, on a high traffic site, so it dies pretty much instantaneously if there is anything wrong with the driver.

Sent from my iPad

Timothy Hawkins

unread,
Mar 25, 2012, 11:26:46 AM3/25/12
to mongod...@googlegroups.com, mongod...@googlegroups.com
Sorry folks, wrong reply to the wrong mail, please ignore

Sent from my iPad

Derick Rethans

unread,
Mar 26, 2012, 6:34:19 AM3/26/12
to mongod...@googlegroups.com
On Sun, 25 Mar 2012, Timothy Hawkins wrote:

> I tried the git hub 1.2 branch about a week ago, and still had the
> same problem, it was characterised by an exception being thrown and
> abrting the apache request thread whenever the savebytes gfs call was
> made.

<snip>

> my app uses gfs to store dynamically generated thumbnails of images,
> on a high traffic site, so it dies pretty much instantaneously if
> there is anything wrong with the driver.

Our test cases don't show anything wrong, would it be possible for you
to provide us with: a simple and self-contained script that reproduces
the problem; which PHP version you use?

Timothy Hawkins

unread,
Mar 26, 2012, 6:35:29 AM3/26/12
to mongod...@googlegroups.com, mongod...@googlegroups.com
5.3.9

I will try and extract something, but its difficult.

Sent from my iPad

Bill Hayward

unread,
Apr 10, 2012, 10:55:46 AM4/10/12
to mongod...@googlegroups.com
Any update on this, Tim? Will you be able to provide the requested doc or is this no longer a concern for you.

> To unsubscribe from this group, send email to mongodb-user+unsubscribe@googlegroups.com.

Derick Rethans

unread,
Apr 16, 2012, 8:54:56 AM4/16/12
to mongod...@googlegroups.com
On Mon, 26 Mar 2012, Derick Rethans wrote:

> On Sun, 25 Mar 2012, Timothy Hawkins wrote:
>
> > I tried the git hub 1.2 branch about a week ago, and still had the
> > same problem, it was characterised by an exception being thrown and
> > abrting the apache request thread whenever the savebytes gfs call was
> > made.
>
> <snip>
>
> > my app uses gfs to store dynamically generated thumbnails of images,
> > on a high traffic site, so it dies pretty much instantaneously if
> > there is anything wrong with the driver.
>
> Our test cases don't show anything wrong, would it be possible for you
> to provide us with: a simple and self-contained script that reproduces
> the problem; which PHP version you use?

Even though I couldn't reproduce it, I think I have just fixed it. It's
reported in PHP-369: https://jira.mongodb.org/browse/PHP-369

Could you please try the latest version from github (the v1.2 branch
preferrably)?

Reply all
Reply to author
Forward
0 new messages