Sim-on-a-stick, Linda Kellie and MySQL

Tags: | | |
POSTED: September 20, 2012

Linda Kellie was one of the best, and most enthusiastic, designers and builders in Second Life and then in various OpenSim-based worlds. In the summer she decided to end her involvement with virtual worlds. However she has kindly left her work available for download and use.

I have been working with some students experimenting with the Sim on a Stick configuration created and curated by Ener Hax. This is a wonderful OpenSim tool, and we have been inspired to find interesting things to do with it. We have been working with SoaS for over a year with two connected projects in mind: a private/public world for children and a meditative/self-reflective one-person world for adults. We have experimented with various sizes for these worlds and for a time they were sixteen sims. This ran successfully, even on a usb stick, but proved to be simply too big for our needs. We spent more time getting to places than actually being there. Our worlds are therefore now all currently four sims (in a 2×2 grid), although we have plans to experiment with a deliberately non-contiguous world

Yesterday we decided to make a one-sim side project that would house Linda Kellie’s Urban City oar file, ostensibly to examine how oar files work but mainly because we wanted to ransack the city. We wanted to check out all the avatars, clothes, furniture, and textures that are available from the city shops!

One of Linda Kellie's images taken in her Urban City

However we hit a problem. The assets would not load. OpenSim gave out line after line of red error messages. Reading the error messages I soon realised that the issue lay inside MySQL. Some of the assets seemed to be bigger than the maximum permitted packet size, and so MySQL was rejecting them. Fifteen minutes of googling later and we had the solution. MySQL has an ini file which needs to have one line added to it, for reasons I will explain below.

This is what you need to do.

  • Open the SoaS folder.
  • Find the MySQL folder and open that.
  • Inside there you will find a file called my.ini Open this with Notepad++ or a similar text editor.
  • Find line 63 where you will see a line saying # SERVER SECTION.
  • Below that, on about line 73, you will see port=3307.
  • Create a blank line below this and write max_allowed_packet=64M
  • That’s it!

If you now try loading the oar it will work perfectly.

You can find an explanation about this in the MySQL developer documentation. MySQL has a default setting of 1MB for the maximum packet size that the server will accept. In normal circumstances this is perfectly sensible. However SoaS is not normal circumstances: the server and client are both local and all the communication happens inside a single computer. There are no bandwidth issues, and no problems of scalability. There is only ever one client in communication with the server.

Thus the usual restrictions need not apply.

Perhaps I should contact Ener Hax and suggest that she might add this line to the default SoaS package, in case anyone else bumps into this issue. I don’t think this change introduces any negative side effects. If you don’t ever need to upload large assets you won’t even notice the change, but if you do then you will be good to go.