Multiple instances on Linux server

Can anyone offer any advice for (many) multiple instances on the same server? I saw something about session files and ApplicationID but didnā€™t take it in.

Have I missed anything important?

One thought is cron updating all instances at once. Perhaps the crob jobs should be staggered.

Cheers

If you run multiple instances on the same server then you might get logged out of one when you log into another instance thats the issue with sessions as far as I am aware. But if you have each instance in its own domain on the server much like you would run multiple websites from the same server then there wont be an issue.

What is the workaround for multiple instances on subdomains of the the same domain? I did see something during the last installation but didnā€™t fully understand or action it.

Cheers

P.S. I have contributed to the Kick Starter as SuiteCRM is going to play a large part of what I do for small businesses. Good luck!

Workaround for what? You havenā€™t clearly said what problems youā€™re trying to solve. I run two SuiteCRM instances on my IIS server - one for crm.mydomain.com, and the other for test.mydomain.com. I donā€™t have any problems that Iā€™ve been able to find.

The only thing you might want to be wary of is during the initial install of SuiteCRM. If you do the ā€œAdvanced Installationā€, youā€™ll have the option of manually specifying cache and temp directories. Youā€™d just want to make sure that these are unique for each SuiteCRM instance on your server.

This is cool! I love seeing people going full-force with SuiteCRM, since Iā€™m taking a big bet on it as well at my organization!

Workaround for what?
I rather assumed that getting logged out from one instance when logging out from another was a problem but Iā€™ve realised that itā€™s the session cookies interfering on my browser - and my browser only. My users wonā€™t see that issue as theyā€™ll use different browsers on different computers.

I have set a different session_dir and unique_key. The cache_dir is relative so I don;t envisage problem.

Panic over :slight_smile:

Iā€™m running two instances in separate folders, like site.com/suiteA and site.com/suiteB.
It took me a while to find a solution for the logout issue, so I thought Iā€™d share it here for the benefit of anyone else who is looking for answers.

Target was to be able to log in to both of these from the same browser and to work as two separate sessions simultaneously. To get the logins to work properly there are two items that need to be set up. Without these I would get kicked out of one instance if I log into the other as any user.

The first one is that you need to add a separate cookie path for the instances. Then the browser should know to use the right cookie for each instance. In my example I set the PHP setting session.cookie_path for the first instance to its path, ā€˜/suiteAā€™, the second one to ā€˜/suiteBā€™. You can set the value in the .htaccess file or httpd.conf file of the instance like this

php_value session.cookie_path /suiteA

The second one is that you need to tell SuiteCRM or PHP a way to differentiate between sessions of each instance so that the users of each instance can be recognized properly. For this you can either change the unique_key value in config.php (the SuiteCRM way), or change the location where PHP stores the session keys for an instance by setting session_dir in config.php (the PHP way).

3 Likes