why heroku app doesn't store the data in the database? - heroku

I've built an internal app that is used only for the organization. The app works fine - it has a form which users fill in and save. It works for few hours that the form is stored in the database, but after a few hours the database is seemingly purged and the app shows no data - as if it's been started for the first time. I checked the log, but couldn't find anything. What and where can I check to find out what's going on? Could it be the case that since I'm using free heroku, it restarts after 24 hours.

Related

Why do I lose contents of my database after a heroku dyno restart?

Anytime my app goes to sleep and comes back on, I lose data in my database
And I'm not storing any media, it's just form data (texts)... I built the app on strapi and I've followed all their guidelines but it keeps happening. I'd be happy if anyone can help
Local data (files, db) is cleared after a Dyno restart because the Heroku File System is ephemeral. A Dyno is restarted (at least) every 24hrs.
In your case Strapi uses SQLite where data is saved in a local file.
Strapi suggests to configure Postgres on Heroku, alternatively you can use an external DB storage service.
First of all:
As you create content types with strapi it generates the code (= new files) for the according controllers/routes/services
Heroku does not persist data after a restart
After a restart strapi checks which content types exist in the code and deletes the tables of nonexisting types from the database.
Therefore, on Heroku you have to set up all your content types locally and connect to an external db (e.g. Heroku Postgres) but never strapi's default textfile based db.
Then push the generated files and finally deploy.
Thus, on Heroku you should always run in production mode. This way the option to alter content types is completely blocked and you will not run into the issue of data loss after a restart.

discord.py how to make a JSON file work on Heroku

When I host the bot using Heroku it no longer calculates the JSON files (even if it makes them work they do not appear) and when I restart it is as if nothing had happened and reset everything.
How can I do?
Heroku does not store changes made to files. Heroku dynos restart every once in a while, and that is when data is lost; redeploying the app can also cause the data to be lost. Using a third-party database, such as MongoDB is recommended.

Parse Data Migration DueDate

Parse is shutting down soon and having a deadline for Database Migration 28th April 2016.
Currently I still have 2 production apps that is live on parse.com, but due to some tight schedule, I am afraid that I won't able to complete my parse database migration on time. Is there any way that can keep my app traffic prioritize even after the due date 28th April 2016?
I can't find any contact to Parse Support Team, that's why I'm asking the question here.
Thank you.
https://github.com/ParsePlatform/parse-server/wiki/Migrating-an-Existing-Parse-App
28th April 2016 is the RECOMMENDED date for migrating to self hosted MongoDB.
Just migrate the database. You don't need to migrate everything now. You have more time to do it. I will explain you supposing you will migrate to https://www.back4app.com
After the migration, both parse.com dashboard, back4app.com dashboard, https://api.parse.com and https://parseapi.back4app.com will be connecting to the same recent migrated database in back4app servers. It means that parse.com api and dashboard will keep working and the same data will also be available both in parse.com and back4app.com.
Therefore until the date you publish the new app connecting to parseapi.back4app.com, all your current customers will keep connecting to api.parse.com that will connect to the migrated database in the back4app servers. Everything will be working fine.
Then you have to test and prepare all your app and once you are comfortable you publish the new version of your app. When published, your clients will start updating their apps. The updated ones will be connecting to back4app.com and others to parse.com. But everything will be working fine because it is the same database.
The scenario described above will work until Feb 2017 and that's why it is important to start the migration process and then the publishing of the new app as soon as possible. So your clients will have more time to update their apps.

How to get rid of this error when starting Tomcat

I am adding some things in an existing Android app, which connects to a Apache Tomcat server to get information from a database, but some of the changes required that I also make minor changes on the webapp (changing some database fields).
I had never used tomcat, but managed to do the simple changes here and there.
But when I deployed it, I noticed some errors(see the photo).
How can I fix them ?
The app works regardless of them, but the server takes a few more seconds to start up.
P.S.I read somewhere that this means that the server already has these libs, and doesnt need to use the ones from the lib folder of the app ?

using sqlite database with Windows store app

I guess I am not the first one who encount this issue, but can't find much information after a bit of research. Here is my question:
A windows store app access a sqlite database, the database contains a
few tables, and it is read only. The size of database is 20 MB.
at the starting of the App, it will copy the database to
application folder (if it is not already there). It works fine,
when i test it manually (although it is not lighting fast). but it
always failed badly when testing again the certification test
toolkits, failed at the preformance test with "app crash" or "app
can start" error.
so my question is
1) is this the correct way of using sqlite database in windows
store app? (i mean using a 20MB database locally) or should i port
the data to cloud?
2) is the failure of the certification toolkit really matter? (
will it also means failure of publishing process?)
Thanks in advance
You are going on perfect way. If your app doesn't need Internet connectivity at all then don't go for cloud database. You should use extended splash screen to copy the database, you should not do that thing in App.xaml.cs. If you use cloud database then it will require more time for request-response. I think SQLite transaction is faster than that.
The certification may fail, if you are not using latest version of WACK. If your app fails WACK test, it won't be published.

Resources