The community is that of 100 or so people, all know each other and all talk about motor sports. Surprisingly enough, they have managed to post 180000+ messages in a period of 8 years
So my plan was to import everything using vBulletin, do some cleaning and then import everything to xenForo.
I started with the vBulletin import. First of all some of my forums were not being imported properly. I noticed that the importer goes through the forums one after another sorting by forum_id (I think) and if you have moved a forum to a category that was created after the forum was created (i.e. child forum_id < parent_forum_id) it would not import it since it would not match it properly. After a lot of troubleshooting I finally managed to get it working by moving some forums around.
Everything went OK until the posts started importing. The system would import around 32000 of them and then stop. Apache would be locked at 100% (on one core). Using nginx I would get bad gateway, so something was really wrong.
I tried as much to troubleshoot the issue using different configurations. I have used nginx/php-fpm, apache, mysql 5.1/5.5, Ubuntu/CentOS/Windows.... nothing worked. It would always break at that point.
I contacted vBulletin support and basically they pointed me to some optimization settings (which did not work) and also pointed out that the database server has to be on the same box as the web server for the import to work. So to cater for all the suggestions, I created a new VPS with 4GB of RAM and run everything there. Same problem.
In the end vBulletin support pointed me to the server optimization forum. I did not believe that the server was the cause of the problem since I tried a lot of different server configurations and the only constant was the same point of failure.
In the end I decided to check every single post that it would halt on. Lo and behold I found the issue.
FusionBB has two fields that keeps the post body. post_raw_body and post_body. post_raw_body contains only markup code and the other contains HTML. For some reason (through upgrades I guess) several records contained HTML in post_raw_body. This was something that the importer could not handle, (possibly a preg_match function or something?) and it would kill itself and Apache as well.
The offending code was:
<img src="http://www.domain.com/forum/images/graemlins/wink.gif" />
Loads of work to be done, sorting out attachments, avatars of users and playing with the style but the difficult part is already over.
Notable is the fact that the xenForo importer did it's job without any problems or errors.
Good job guys!