Custom Module increase OpenMRS start up time

I have an issue with a custom-built module that slows down my OpenMRS instance during startup, whenever I tried to start my Openmrs instance it keeps running the start up process for hours.

Do you have an idea of what could be causing this issue?

Can you point us to the repository that has the source code of the module?

it’s in a private repo

You might look to see if the module activator is doing a bunch or work or if the module has a poorly-designed liquibase.xml or something, but without looking at the module or (at the very least) a log with the module running, this is just a guessing game.

Here is the link to a repo that has the project

Thanks

@ibacher The module activator seems empty. Also is it possible for a module to conflict with another module in openmrs distro

Was it always this slow? Or did it just start happening after adding a new module or all modules concurrently? Which version of the openmrs platform? I will suggest you scale-up both JVM and physical memory to perhaps 2GB, monitor the server logs and post here.

@morrisng You’ve created a really interesting issue there… I have no idea why that’s happening off-hand.

@morrisng your module has compiler errors. Can you first fix them?

1 Like

@dkayiwa that has been fixed please try again.

Also, here is the log from the console.

https://pastebin.com/Ut0Pdfmc

@morrisng Here is a git patch file that gets your repository to work on my machine. Basically, for some reason the webModuleConfig.xml was setting the moduleId property of the StandardModuleUiConfiguration bean. I don’t think that’s the right way to configure that, and in any case, that seems to have been the root cause. I’ve also included some small adjustments.

Are you referring to this? https://wiki.openmrs.org/display/docs/Using+the+UI+Framework+in+Your+Module#UsingtheUIFrameworkinYourModule-BeansinwebModuleApplicationContext.xml

So I was. I missed that. There were other small Spring issues I fixed, so I guess it must’ve been something else! My bad.

@ibacher did the module start on your openmrs instance and if it does how long did it take.

Yes it started and took no noticeable amount of time to start

Thank you @ibacher however I would appreciate it if you would simulate my environment on your machine so I have zip a copy of my modules folder here https://drive.google.com/open?id=1Em8hHKRm2HKeb6GOZT4HbirwcDPteWB5

Also, I use openmrs 2.0.6

I just want to confirm if it will take the same time to start up like you said before.

Thanks.

Hi @ibacher, it seems this link is broken, could you pls check.