XF 2.2 importing vBulletin 3.8 albums - update: getting Fatal Error: Out of Memory

Theo Smit

Member
I got our forum converted from vB 3.8.8 to the current XF installation a couple of days ago. Yesterday I installed the media gallery add-on and would now like to get any albums that the vB users may have had extracted from the vB database and ported over to XF albums. What are the steps required to do this (hopefully without wiping out the new posts over the last couple of days) ? The instructions that I've found so far are not very clear on the details and I'm hesitant to just run the importer on everything again.

Thanks in advance!
 
Your thread title and the text of the message don't totally seem to match. (I think the title was edited after the fact but the body wasn't updated.)

Presumably you found the import system and are now running into the "out of memory" error. We'd really need to see the full error message, but "out of memory" is PHP trying to allocate memory and failing. This would generally mean the server itself is out of memory or there's some explicit process limit that is preventing the allocation. Unfortunately, there usually isn't a lot we can do about this, though seeing the full error would allow more specific guidance. If it's a temporary server error, trying again may fix the issue; if it's always failing after the same amount of memory usage, this may be something you need to talk to your host about. (Image resizing/thumbnailing is memory intensive on large images.)
 
Fatal Error: Out of memory (allocated 195035136) (tried to allocate 966656 bytes)

What do I do about this? Google shows me this is not a new issue (at least not for older versions of XF).
Your thread title and the text of the message don't totally seem to match. (I think the title was edited after the fact but the body wasn't updated.)

Presumably you found the import system and are now running into the "out of memory" error. We'd really need to see the full error message, but "out of memory" is PHP trying to allocate memory and failing. This would generally mean the server itself is out of memory or there's some explicit process limit that is preventing the allocation. Unfortunately, there usually isn't a lot we can do about this, though seeing the full error would allow more specific guidance. If it's a temporary server error, trying again may fix the issue; if it's always failing after the same amount of memory usage, this may be something you need to talk to your host about. (Image resizing/thumbnailing is memory intensive on large images.)
Sorry for not posting the whole message from the server error log. It reads
  • ErrorException: Fatal Error: Out of memory (allocated 195035136) (tried to allocate 966656 bytes)

  • src/XF/Db/Mysqli/Statement.php:86
The first time I tried to run the import, it gave me a message that corresponded to 128 MB being allocated. I connected with my service provider, who increased the PHP Ram allocation to 256 MB and then to 512 MB (they are unwilling to go larger at the moment), but I am still getting this message which suggests something else is limiting out at 192MB.

Any insights would be most helpful.

Edit: I have the vB database backup imported on my local machine as well. Is there a query or other operations I can do locally that would permit me to subsequently import these albums to XF on our server?

More edits: Below are some screenshots of the error message, and of the server setup. If PHP_memory_limit is set where it is (at 512 MB), is it possible for the hosting provider to throttle that down? How could I check what the maximum memory is that the server environment would actually let me allocate? I verified that php.ini and XF.php both have the memory limit set to 512MB

As an aside, this issue concerns the import of less than 95 albums (95 is the highest albumid).


Screen Shot 2021-01-01 at 1.38.06 PM.webpScreen Shot 2021-01-01 at 1.39.29 PM.webp
 
Last edited:
So an "out of memory" error is not a PHP memory_limit issue. That would trigger a different message. This is something else that is blocking the amount of memory PHP can allocate, potentially via something like ulimit. If they've been willing to increase the memory limit thus far, hopefully they'd be willing to adjust the limits that are being triggered.

(Unfortunately, PHP memory issues are notoriously hard to debug because there's no stack trace provided and even if there were, the error is being triggered when the memory issue happened, but it doesn't confirm what is holding on to the memory.)

I have the vB database backup imported on my local machine as well. Is there a query or other operations I can do locally that would permit me to subsequently import these albums to XF on our server?
It would be possible, though you'd need the data files as well and you'd have to setup PHP/MySQL and a webserver. There are some packages that can help make this fairly simple. From there, you'd need to install XF locally and do the full import there. Then export the files and database to your live server.

So technically possible, though it's likely to be a fair amount of work.
 
Top Bottom