[英]Best practice for managing OrientDB connections in Express.js / Web Applications
If you are using Oriento, you can try connection pooling, as per PR #7 you can set it like this: 如果您使用的是Oriento,则可以尝试连接池,根据PR#7,您可以这样设置:
var server = Oriento({
user: 'root',
password: 'foo',
pool: {
max: 10 // use a maximum of 10 sockets in the pool
}
});
Please bear in mind that at some point connection pooling config was hidden from Oriento's README due to issues with thread safety [...] in orientdb ( reference ). 请记住,由于orientdb ( 参考 )中的线程安全性问题,连接池配置有时在Oriento的自述文件中是隐藏的。 You may want to clear that before using it.
您可能需要在使用前清除它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.