Tencent CentOS 7.4.64 Tomcat startup is particularly slow solution

Two days ago, after happily configuring my little server, I suddenly found that Tomcat was slow to start up. How long does it take, about two cigarettes. After some hard work, I finally solved it, and found the log file of Tomcat by the way. Simply. . . .

Well, let's get down to business, the solution:

The crudest solution:

            yum install rng-tools

Then confirm the installation, then start his service:

            systemctl start rngd  

        That's it, the time it takes to start Tomcat again, a few seconds.

    The reason is not very clear. It seems that the entropy pool is not enough, so an instance process is blocked. Since I don't know much about it, the specific reason is really unclear.

Then talk about the problem you encountered.


At the beginning, I just knew that it was slow to start. Since it was installed with yum, I didn’t know the installation directory at all. I searched and searched, and finally found something called Catalina.out. After checking, there is basically nothing. . . . . . . Uncomfortable, no way, toss and turn, still can't fix the root. I just don't care, I just follow the tutorial, and I found that not only I can't do this, but I can't find the .sh file, so I went, I can't help it, I can only find another way. Finally found this way.

    

After solving the main problem, look back at other problems. I finally found the Tomcat directory with the Find command. I won't go into details. Baidu Find usage, just find tomcat directly. Then the ghost thing happened again, there is still only one sentence in this file, and it is not updated every time it is started, just like a dog. Turning around, I found that there are a lot of files in the logs. I looked at them one by one and found a log that will be updated. A novice like me looked for it by myself. Otherwise, it would be useless to find it. I just learned it, but I learned it. , I can't see it, but it doesn't matter, this kind of pit will come to you one day sooner or later, and then let's talk about it in detail.


Interested students can take a look at the JVM, and they will be able to see more. On these, other methods, Baidu can come up with a lot.


  

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324757525&siteId=291194637