Starting of server is time consuming

I’m using sdk server with the following configuration- 1) Distribution platform 2) Reference Application 2.9.0. It is consuming a lot of time for the server to start. Also the building of modules is very slow.

Thank you :slight_smile:

Being the first time to run you have to exercise some patience.

It’s not the first time I am running sdk server. But every time I start the server it takes around 30 mins to start. Is there some way to speed it up?

Could you tell me the specs of your machine and maybe other programs you have running concurrently? Cuz setting up the server for the first time on my machine would take a while(not up to 30mins though), but subsequent times I ran, it doesn’t take up to 5minutes. Also, are there any watched projects currently running on the server? I ask this cuz I have experienced a situation where the server took about 30minutes to start, but that server contained over 10 watched projects, so I guess that was the reason.

Windows 10 OS. Processor: Intel® Core™ i5-7200 CPU @ 2.50GHz 2.71GHz. Installed memory (RAM): 8GB System type: 64-bit OS.

Also what is meant by watched project? and where do I to check the watched projects running on a server?

More information about watching modules/projects: https://wiki.openmrs.org/display/docs/OpenMRS+SDK#OpenMRSSDK-Watchingprojects

This allows you to use the SDK and modify local software module. Running the SDK will pick up any changes in the module.

To see what is watched, I go into the SDK directory and check the “watched.projects” variable in the openmrs-server.properties file.

@haripriya do you specifically have to use the sdk ?? For development and Testing purposes , the standalone is much more lighter and more speedy than other installation ways like the sdk and enterprise.

The only case where you would need the sdk is when your trying to set up very custom distribution , otherwise i would recommend the standalone ,especially for Testing and Development

Thank you @ball and @mozzy . I will try out the suggestions , and report if I encounter any further problem :slight_smile:

1 Like

Hello @haripriya have you been able to succeed in starting up the server? Don’t be blocked for long without notifying the community or your mentor. :slight_smile:

You need to create a system environment variable called MAVEN_OPTS

then set its values to -Xmx1024m -XX:MaxPermSize=128m

I think a machine restart may be needed and see if this helps

1 Like

Thank you @ssmusoke . I will try it out. :slight_smile:

1 Like

I tried the standalone application. It started really quick but I am facing issues while loading the coreapps module. I loaded the same module on sdk and it worked, but on loading the same on standalone resulted in UI framework error. Also is there some other way to load modules apart from loading it from manage modules under administration?

Thats cool.

can we have a look at the erorr logs?? Could it be problem of version mismatch??

In the standalone’s appdata/modules folder, delete the old omod and replace it with the one you have changed. Then restart the standalone.

@haripriya it seems i hadnt got you properly. did you mean that innitially the standalone run succesfuly. and on re-deploying the core apps module with your local changes it fails??

Ok, I will try doing this . Thank you :slight_smile:

Yes, it failed after deploying my local changes. But it didn’t generate any error/fail on deploying the same omod on SDK server.

Stop tomcat. Then delete the log file under the standalone’s tomcat/logs folder. Start the standalone to reproduce the error and paste the log file contents at pastebin.com

@dkayiwa and @mozzy I just tried deploying the module by pasting the omod file directly in appdata/modules folder, and now it seems to work fine. It isn’t generating the same error anymore. Thank you :slight_smile:

1 Like

@haripriya ,its great you have unblocked your self. thats what exactly @dkayiwa innitially told you to do

1 Like