OrangeScape Developer Community

A community for Application Developers on OrangeScape's Platform-as-a-Service

Speed up the startup of server when the network is slow

If your server is starting up too slow, due to the network being slow, and you are pulling out the network cable (disconnecting from the network) to make it start faster, then you can use any one of the following solutions to make it start faster without pulling out your network cable..

 

Solution 1:


Note: You need to be super user (administrator/root/sudo) to do this.

Windows:

1. Start -> Run -> Drivers
2. open the \etc\hosts file in notepad.


*nix \ solaris :

1. open a terminal (Konsole if you are using KDE)
2. become a super user or do a sudo
3. open /etc/hosts file in your favourite text editor.


Add these following 4 lines at the end of the file after the line 127.0.0.1 localhost

127.0.0.1 java.sun.com
127.0.0.1 www.w3.org
127.0.0.1 openoffice.org
127.0.0.1 purl.org

Do not copy and paste it into that file.....
the format is 127.0.0.1 < tab > < url >

Before doing this, notice how much time it is taking to start the server. then stop it, add these lines to that file and then start the server again.
you can notice the difference.

My server after adding these lines, starts in 2.5 minutes. before adding these lines, it started in 22 minutes.

The reason for this behaviour:

/etc/hosts file is used to hold the ip address and domain mapping, so that you can access the network devices much faster than using a DNS server or a arp / rarp lookup.

i.e You don't have to wait till the device responds back with "i am here." to your machines query of "where are you?".

machine1 : where are you machine2?
machine2 : i am here at 10.0.0.72, machine1.

During server startup, each model will try to access the above mentioned urls for dtd validations and such.

What we are doing is, we are making the system to return the ip address for the above urls as localhost. so that the urls would fail (as though there is no network / simulating the pulling out of network cable), and the models startup will be fast.

Note:
1. If you are using a proxy to connect to the network, then you will need to add these urls to the exceptions list in your browser's proxy settings.
2. You will not be able to access these urls after you do this.

1. If you are using proxy, just remove these urls from exceptions list and you will be able to access the urls
2. If you are not using proxy, you will have to remove the entries from /etc/host and then restart your browser, to access these urls.

 

Solution 2:

 

Downlod the script below, and put all your models in the IN folder run the batch file and take the files from the OUT folder and deploy into your server.

 

Note:

1. after patching the models with the script, Do not use studio to deploy the files.  copy and paste the models directly into the server deploy folder.

 

network_Lookup_Patch_for_Dimension2.4.zip

network_Lookup_Patch_for_Dimension2.1.zip

Views: 58

Comment

You need to be a member of OrangeScape Developer Community to add comments!

Join OrangeScape Developer Community

Comment by Kranti Mamidala on November 19, 2010 at 5:14pm
Anbu,

On FIC production server, there are 440 ear files on deploy directory. After applying the above given settings and also all external urls are disabled on server.
Now server deployment takes 1 minute to deploy 7 ear files. So for complete startup this would take more than 60 minutes.

The bigger problem here is, during production releases it would be very difficult to 1 hr downtime.

Can anyone please suggest other workarounds to speed up the server?

© 2017   Created by OrangeScape Technologies.   Powered by

Badges  |  Report an Issue  |  Terms of Service