0

How to increase the connection slots when inserting new data in Apache IoTDB?

I would like to ask if I encounter an error like this when saving new data in Apache IoTDB: "FATAL: remaining connection slots are reserved for non-replication superuser connections", how to change any parameter settings to increase the connection slots? At present, I only store about 50 rows per second of new data inserted, and use the apache-iotdb pypi library.

Does anyone can deal this problem? Help please

yiihu
  • 1

1 Answers1

1

To increase the connection slots in Apache IoTDB and resolve the error you mentioned, you need to modify the PostgreSQL configuration used by IoTDB. Here's a step-by-step guide to increasing the connection slots:

  1. Locate the iotdb folder in your Apache IoTDB installation directory.
  2. Inside the iotdb folder, find the lib subfolder.
  3. In the lib folder, you should see a file named iotdb-pg-.jar (e.g., iotdb-pg-0.12.2.jar). This JAR file contains the PostgreSQL extension used by IoTDB.
  4. Make a backup copy of the iotdb-pg-<version>.jar file, just in case.
  5. Open the iotdb-pg-<version>.jar file
  6. Extract the contents of the JAR file to a temporary location.
  7. Inside the extracted files, navigate to the META-INF folder.
  8. In the META-INF folder, locate a file named postgresql.conf.template.
  9. Extract the postgresql.conf.template file to a separate folder.
  10. Open the extracted postgresql.conf.template file with a text editor.
  11. Search for the max_connections parameter in the file. It should be set to a default value, such as 100.
  12. Change the value of max_connections to the desired number of connection slots you want to allocate. For example, you can set it to 200 or any other appropriate value based on your requirements.
  13. Save the modified postgresql.conf.template file.
  14. Re-archive the contents of the extracted iotdb-pg-<version>.jar file, including the modified postgresql.conf.template file. Rename the re-archived file to iotdb-pg-<version>.jar (e.g., iotdb-pg-0.12.2.jar).
  15. Replace the original iotdb-pg-<version>.jar file in the lib folder of your Apache IoTDB installation with the modified JAR file you created.
  16. Restart the Apache IoTDB service.
Toby_Stoe
  • 216
  • 1
  • 11