Questions tagged [node.js]

58 questions
6
votes
1 answer

What kind of database to store Quotes

I'm designing a very simple application to send positive text messages to subscribers at a certain frequency. These are just famous, motivational, encouraging and positive quotes. When I first thought of the idea I thought, oh we can just store…
user2402616
  • 211
  • 1
  • 6
3
votes
1 answer

What are some likely causes of high Client:ClientRead AAS in AWS RDS?

I have a particular query, its a simple select with an inner join. Seems to be pretty well indexed. But it's registering as a worst offender in performance insights. With a 0.13 on CPU and a 4.5 on Client:ClientRead. All the documentation and…
invertedSpear
  • 201
  • 2
  • 8
3
votes
0 answers

MongoDump Failed: error writing data for collection `collection` to disk: error reading collection: EOF

[BACKUP COMMAND] mongodump --host 127.0.0.1 -d database --port 27017 --username username --password password --out /output/path/mongodump_DATE_12_00_AM [ISSUE] Failed: error writing data for collection collection1 to disk: error reading collection:…
Kavin
  • 31
  • 1
  • 2
3
votes
3 answers

Is it normal for MySQL to gradually increase memory usage over time?

Is it normal for MySQL to increase memory usage over time? See image below of my server's memory usage over the last two weeks. After "service mysql restart" it drops to 40%. The database is used by a node.js app. Server has 4GB of RAM with below…
steven
  • 31
  • 1
  • 2
3
votes
1 answer

AWS RDS responds with (Got an error reading communication packets). Works locally

I've been on this issue for a couple of days now, I will cover things I've tried at the end. So I'm running a NodeJS server from a GitHub repo using netlify-lamda. I am connecting to an Amazon RDS (MySQL). So the strangest thing is this works…
definaly
  • 31
  • 1
  • 1
  • 4
3
votes
1 answer

RequestError: Connection lost - read ECONNRESET

I am new to Microsoft SQL Server, please advise. I am receiving the following error message when I deploy code into my development environment (which is hosted on Azure using Node.js (version 10) and Objection.js (1.4.0). It works fine locally and…
Kiwi Rupela
  • 133
  • 1
  • 7
3
votes
2 answers

Connection pooling - NodeJS or Database products?

Consider the mysql package. The description covers connection pooling thus, Rather than creating and managing connections one-by-one, this module also provides built-in connection pooling using mysql.createPool(config). Then, there is the…
cogitoergosum
  • 155
  • 1
  • 6
3
votes
3 answers

Does pure MongoDB use schemas and models like Mongoose?

I'm new on pure MongoDB and I've some questions about pure MongoDB. 1. Does pure MongoDB use schemas and models like Mongoose ODM? If you have used Mongoose ODM, you know that Mongoose ODM uses schemas and models for defining fields with their…
3
votes
2 answers

How do I retrieve columns inserted in subquery 1, and return them with columns inserted in subquery 2?

Stack: React Native Node 10.x pg-promise 8.x PostgreSQL 10.x A location row is upserted before creating a user row: const insertUserSql = ` with l as ( insert into locations ( data, placeid, user_count ) values ( $1, …
noah
  • 41
  • 3
3
votes
1 answer

How to handle large database updates with node js

I have a program which is time based. The users have all day to enter data that will affect their score, however if you haven't entered anything by midnight then your score is negatively affected. I had thought about setting up a chron job to handle…
KAT
  • 133
  • 5
2
votes
1 answer

MongoDB Container Connection Hangs with no Response

This is my first time trying MongoDB. I'm just trying to simply connect to it successfully. I'm following the W3 tutorial here: https://www.w3schools.com/nodejs/nodejs_mongodb.asp docker-compose.yml version: '3.1' services: mongo: image:…
Adam Winter
  • 131
  • 5
2
votes
1 answer

Postgres connections are in "idle" state but cannot find any connected client

I have a single Postgres server and a set of PgBouncers configured to help me with connection pooling. Recently, I discovered that the database connections are getting accumulated in "idle" state over time. => SELECT COUNT(*), state FROM…
Eranga Heshan
  • 133
  • 2
  • 9
2
votes
0 answers

How do I add and/or modify $jsonSchema for a MongoDB collection from within the NodeJS driver?

I would like to use the MongoDB native schema functionality in a Node application using the MongoDB NodeJS driver. I do not want to use Mongoose for this. Mongoose has it's own implementation of Schemas, but has different issues which makes me want…
Chris V
  • 121
  • 4
2
votes
2 answers

AdonisJS: is something wrong with belongsTo() relationship design?

In AdonisJs framework, suppose we have a Profile model in which we define belongsTo() relationship to theUser model. The documentation says this will lead us to define our databases this way: The column id in users table is a foreign key…
1
vote
0 answers

Connecting to SQL in docker in EC2 becoming slower

I am now running a PostgreSQL inside a Docker inside a EC2, and a Node.js instance is connecting to it. I recently found that the connection is becoming slower. Before, restarting the instance only need a few seconds to establish the connection. But…
1
2 3 4