IrisPumila
MySQL is Unstable
I'm using MySQL on Railway, but it's not stable. The same SQL sometimes gives an error and sometimes doesn't; its behavior is suspicious. When I restart the DB, the queries respond consistently, but there's no response when I try to execute a query from Python.
I'm also getting the following errors in MySQL. It seems to be a configuration issue:
2023-07-30T08:00:38.853440Z 0 [Warning] [MY-011068] [Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead.
2023-07-30T08:00:38.855623Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.33) starting as process 1
2023-07-30T08:00:38.863104Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2023-07-30T08:00:39.051646Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2023-07-30T08:00:39.352836Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2023-07-30T08:00:39.352876Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2023-07-30T08:00:39.355394Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
2023-07-30T08:00:39.410495Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.33' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server - GPL.
2023-07-30T08:00:39.410472Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock
What's the most stable database on Railway that also has good compatibility with Python? I personally want to use MySQL, but it's unstable. If there's a way to make it stable, please tell me.
Thank you in advance.
7 replies
Running discord.py on Railway, but print statements are not output as logs.
Although I should be doing stdout with print statements, for some reason they are not output in the log. For example, the following source code does output:
However, when I switch to code that includes discord.py, there is no output. Even if I pasted the above code at the very top, the result was the same. I can't provide all the code for discord.py, but I will provide a part of it. When run on a CentOS 8 environment, the print statements are displayed correctly.
Is there a problem where print statements are not output when using discord.py? Or do I need to set something up? I would appreciate it if you could let me know.
Thank you in advance.
12 replies
How to set environment variables when deploying using CLI
I know that it is not possible to set environment variables via "railway variables set" when deploying using the CLI. So, I would like to know how to automatically set the environment variables from the ".env" file when I prepare the ".env" file and the "Dockerfile" and deploy them.
The contents of "Dockerfile" are as follows.
FROM python:3.11
WORKDIR /bot
COPY requirements.txt /bot/
RUN pip install -r requirements.txt
COPY . /bot
CMD python main.py
9 replies