What if the response speed is slow after the project is deployed to the server ?, Slow deployment

Source: Internet
Author: User

What if the response speed is slow after the project is deployed to the server ?, Slow deployment

A simple project is to call an API to query the express delivery information. When running locally, the response time is the slowest, that is, several hundred milliseconds. However, deploying a project on the server becomes several seconds. What is strange is that it is slow. After an afternoon, I checked the server network, configuration, and other reasons. At last, an error is reported when the server is started.

Caused by: java.net. unknownHostException: centos6: Unknown name or service at java.net. inet6AddressImpl. lookupAllHostAddr (Native Method) at java.net. inetAddress $2. lookupAllHostAddr (InetAddress. java: 928) at java.net. inetAddress. getAddressesFromNameService (InetAddress. java: 1323) at java.net. inetAddress. getLocalHost (InetAddress. java: 1500)

This error has never been encountered before, but it seems to be related to the network. So I figured out whether the slow speed was related to this error and solved it by the way.

Specific solution:

Modify the etc/hosts file: Add host name ing

The host name is the name following @ in front of the linux Command.

After the problem is solved, the above error will not be reported when tomact is started. What's amazing is that the response speed of the Project is getting faster. Although I don't know what the principle is, I can decide on this issue.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.