Gustavo
Gustavo
RRailway
Created by Gustavo on 10/24/2023 in #✋|help
Does Railway blocks memory for files on runtime?
Im having problem with save file on buffer to process, the stack is Node + Fastify, and the code works on localhost perfectly, but on Railway just stop on
file.toBuffer()
file.toBuffer()
that saves file in memory for usage.
const fileName = file.filename;
const fileData = await file.toBuffer() <- Stops here

const workbook = xlsx.read(fileData, { type: 'buffer' });
const sheetName = workbook.SheetNames[0];
const sheet = workbook.Sheets[sheetName];
const jsonData = xlsx.utils.sheet_to_json(sheet) as IBaseBTGFile[];
const fileName = file.filename;
const fileData = await file.toBuffer() <- Stops here

const workbook = xlsx.read(fileData, { type: 'buffer' });
const sheetName = workbook.SheetNames[0];
const sheet = workbook.Sheets[sheetName];
const jsonData = xlsx.utils.sheet_to_json(sheet) as IBaseBTGFile[];
39 replies
RRailway
Created by Gustavo on 10/20/2023 in #✋|help
My Redis database is restarting over and over without stop!
This is the logs that are generating every 5 seconds
redis 16:28:41.78 Welcome to the Bitnami redis container
redis 16:28:41.78 Subscribe to project updates by watching https://github.com/bitnami/containers
redis 16:28:41.78 Submit issues and feature requests at https://github.com/bitnami/containers/issues
redis 16:28:41.78
redis 16:28:41.79 INFO ==> ** Starting Redis setup **
redis 16:28:41.89 INFO ==> Initializing Redis
redis 16:28:41.91 INFO ==> Setting Redis config file
redis 16:28:41.94 INFO ==> ** Redis setup finished! **
redis 16:28:41.95 INFO ==> ** Starting Redis **
1:C 20 Oct 2023 16:28:41.971 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
1:C 20 Oct 2023 16:28:41.971 # Redis version=6.2.12, bits=64, commit=00000000, modified=0, pid=1, just started
1:C 20 Oct 2023 16:28:41.971 # Configuration loaded
1:M 20 Oct 2023 16:28:41.971 * monotonic clock: POSIX clock_gettime
1:M 20 Oct 2023 16:28:41.972 * Running mode=standalone, port=6379.
1:M 20 Oct 2023 16:28:41.973 # Server initialized
1:M 20 Oct 2023 16:28: WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can can also cause failures without low memory condition, see https://github.com/jemalloc/jemalloc/issues/1328. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
1:M 20 Oct 2023 16:28: Reading RDB preamble from AOF file...
1:M 20 Oct 2023 16:28: Loading RDB produced by version 6.2.12
1:M 20 Oct 2023 16:28: RDB age 854525 seconds
1:M 20 Oct 2023 16:28: RDB memory usage when created 421.45 Mb
1:M 20 Oct 2023 16:28: RDB has an AOF tail
1:M 20 Oct 2023 16:28: Done loading RDB, keys loaded: 84764, keys expired: 0.
1:M 20 Oct 2023 16:28: Reading the remaining AOF tail...
1:M 20 Oct 2023 16:28: DB loaded from append only file: 2.404 seconds
1:M 20 Oct 2023 16:28: Ready to accept connections
redis 16:28:41.78 Welcome to the Bitnami redis container
redis 16:28:41.78 Subscribe to project updates by watching https://github.com/bitnami/containers
redis 16:28:41.78 Submit issues and feature requests at https://github.com/bitnami/containers/issues
redis 16:28:41.78
redis 16:28:41.79 INFO ==> ** Starting Redis setup **
redis 16:28:41.89 INFO ==> Initializing Redis
redis 16:28:41.91 INFO ==> Setting Redis config file
redis 16:28:41.94 INFO ==> ** Redis setup finished! **
redis 16:28:41.95 INFO ==> ** Starting Redis **
1:C 20 Oct 2023 16:28:41.971 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
1:C 20 Oct 2023 16:28:41.971 # Redis version=6.2.12, bits=64, commit=00000000, modified=0, pid=1, just started
1:C 20 Oct 2023 16:28:41.971 # Configuration loaded
1:M 20 Oct 2023 16:28:41.971 * monotonic clock: POSIX clock_gettime
1:M 20 Oct 2023 16:28:41.972 * Running mode=standalone, port=6379.
1:M 20 Oct 2023 16:28:41.973 # Server initialized
1:M 20 Oct 2023 16:28: WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can can also cause failures without low memory condition, see https://github.com/jemalloc/jemalloc/issues/1328. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
1:M 20 Oct 2023 16:28: Reading RDB preamble from AOF file...
1:M 20 Oct 2023 16:28: Loading RDB produced by version 6.2.12
1:M 20 Oct 2023 16:28: RDB age 854525 seconds
1:M 20 Oct 2023 16:28: RDB memory usage when created 421.45 Mb
1:M 20 Oct 2023 16:28: RDB has an AOF tail
1:M 20 Oct 2023 16:28: Done loading RDB, keys loaded: 84764, keys expired: 0.
1:M 20 Oct 2023 16:28: Reading the remaining AOF tail...
1:M 20 Oct 2023 16:28: DB loaded from append only file: 2.404 seconds
1:M 20 Oct 2023 16:28: Ready to accept connections
18 replies