Nakama 2.11.1 30-60 second load time for lua runtime modules on linux

We are experiencing a long delay in loading lua modules on server startup in our linux environments, is this a known problem? The same modules with the same version of nakama on mac loads almost instantly. If this is a known issue has it been resolved in the newest version of nakama?
Thanks.

@oscargoldman It depends a lot on what sort of attached disk you use with your Linux environments. There’s no reason that it’d be slow to load on Linux but near instant on macOS. The server pools VM instances used to handle runtime function execution in the server framework. This amortizes out the cost to load and evaluate the code at server startup. Right now its not clear to me there’s an issue at all.

How much code do you have that needs to get loaded?

This is nakama running in a VM on a windows machine. I’m also fairly sure that this is a recent behavior change as we were doing lua module dev on linux before and the modules were loading very quickly on server restart. The amount of lua code we load in is approx 70 kb, 26 modules in total.

Some additional info on this. When running nakama connecting to a local postgresql database, lua module loading is very fast, but when connecting to a remote database, lua modules take 1 minute or more. This is confirmed on both linux and mac vm’s.

@oscargoldman Do your modules run any kind of database work as part of their initialization - perhaps load data from the database to cache in-memory, or scan over users/storage etc?

Hey Andrei - well pretty well all of our modules use nk.storage, but only in the context of the rpc call itself. Would this require some kind of db handshake when the module is added to the server during the server start routine? If that was the case it makes sense the lua loading would take ages when using a remote db. We’re doing direct sql manipulation from our go module, both to our nakama db and another db we’re running, but the go module loads fine.