MARIADB Multi-threaded connectivity issues

Source: Internet
Author: User

In R, the database is written using multithreading, and in the local Linux environment, there is always a problem with insufficient threads. In the Windows environment, it does not appear.

Personal conjecture is due to the maximum number of connections that ODBC has limited under window, so it does not exceed the maximum number of connections to the database, so there is no problem with multithreading running under window.

Under local Linux, there is no limit due to local direct connection. When the program is blocked, it will not stop generating new threads to connect the database, it is easy to reach the max_connection of the database, causing the server to run the script at the time of insufficient thread.

Subsequent considerations limit the number of threads in the script, and no new threads are generated when a value is reached;

On the other hand, you can also consider limiting the number of connections that are generated. And then we'll see if this problem will happen again.

For scenarios that limit the number of connections, refer to MARIADB to view the system connection commands:

Http://www.linuxidc.com/Linux/2016-05/131027.htm

MARIADB Multi-threaded connectivity issues

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.