| |

VerySource

 Forgot password?
 Register
Search
View: 1758|Reply: 11

How to solve After Tomcat's database connection pool reaches the maximum value, maxActive = "100" will cause an error

[Copy link]

1

Threads

4

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-1-26 04:20:01
| Show all posts |Read mode
After Tomcat's database connection pool reaches the maximum value, maxActive = "100" will cause an error.
   Is there any way to make a prompt page when no connection is available, telling that the website is busy now and try again later?

It should be when I take the connection to log in to the project I made. At this time, I need to verify the user name and password. If I can't get the connection, I will be prompted.

How to write the specific judgment that the connection cannot be obtained?
Reply

Use magic Report

1

Threads

4

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

 Author| Post time: 2020-4-14 17:00:02
| Show all posts
Who will give pointers. Please help.
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-4-17 01:30:01
| Show all posts
Make a mark, I hope the expert will come
Reply

Use magic Report

0

Threads

11

Posts

10.00

Credits

Newbie

Rank: 1

Credits
10.00

 China

Post time: 2020-5-13 11:30:01
| Show all posts
In the program, when the connection used = 100, your program will go to the database to get the connection, the database will report an error, you catch this error, and then turn to a page prompt!
Reply

Use magic Report

0

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-5-14 17:15:02
| Show all posts
Upstairs is right
Reply

Use magic Report

0

Threads

63

Posts

42.00

Credits

Newbie

Rank: 1

Credits
42.00

 China

Post time: 2020-5-14 20:15:01
| Show all posts
How is it possible to reach maxActive 100? ? ! !

The landlord knows how to use DataSource / DBCP?
Reply

Use magic Report

0

Threads

4

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-5-15 10:00:02
| Show all posts
The landlord may be the application's own connection pool program, right?
A piece of code should be written to control the inaccessibility when the number of connections reaches the maximum

It is best to create a new connection when the number of connections reaches the maximum, so as to avoid the situation of inaccessibility and errors.
Or you can use catch to catch the exception, and then do the corresponding processing in the catch, or catch the exception and then output, or do the error page jump!
Reply

Use magic Report

0

Threads

63

Posts

42.00

Credits

Newbie

Rank: 1

Credits
42.00

 China

Post time: 2020-5-21 19:15:01
| Show all posts
What I want to ask is why a Tomcat BS system will achieve such a large amount of concurrency.
Reply

Use magic Report

0

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-6-3 19:15:01
| Show all posts
May not close the connection
Reply

Use magic Report

1

Threads

4

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

 Author| Post time: 2020-8-6 10:30:02
| Show all posts
to:liteding, thank you for your answer. I didn't expect it. Catch it directly.
  to:tellyou, I don't know what you are doing.
to:others .3Q
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list