Slow import of realms and users from directory, during startup

I am using 3.4.3 version of keycloak with postgres DB which has over 2000 realms and I want to migrate with export/ import to version 7.0.1 version of keycloak. I have managed to export it all into a directory with realms and users in different json files.

Now I am trying to import all these files into an existing DB (Production) of 7.0.1 keycloak using a docker container. This is taking more than 24 hours to complete the import, which is too much of time considering the environment.

Wanted to know what actually would be causing this slowness. Import starts of well, but slows down as it progresses.

Can anybody suggest what changes to the configuration might help, please.

Any suggestion would help alot.

Thanks in advance.

Hi @jangaraj and @zonaut Just wanted to check if you have any clue about this issue. Just tagged you since for my other queries, your solution had greatly helped me, hence just wanted to check with you if you have any idea. I am stuck with this since a long time now and any help would be greatly appretiated. Thank you.