Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

OCI Always Free - database keeps stopping. (APEX)

Mint-InnitNov 6 2019 — edited Dec 20 2019

Hi all, I appreciate that the correct space for this is probably the Oracle Cloud Customer Connect Community (I think - having gone round and round in circles trying to find where to discuss OCI issues). I haven't been able to set up an account there yet for various reasons but am in the process of doing so.

Anyway, seeing as OCI always free has had the hard sell as a good place for apex development, I'll ask here as well just in case anyone knows the answer.

I have created an Apex app on a free autonomous database. The app is used daily monday-friday. However every 7 days (I think) the DB suddenly stops, and I have to log into my tenancy and manually start it.

So it would appear that the "if you don't use it for 7 days it gets stopped" rule is being tripped. Fine, but I use it nearly every day! Do I in fact have to log into my cloud account AS WELL at least once a week to ensure everything keeps running? If so that is a real pain..

If anyone else is using the free tier for development and has any tips, that would be handy. (yes I tried the free 'chat' support - but I got as much help as expected, being a 'free' user ;-)

Cheers.

This post has been answered by Birch19 on Nov 13 2019
Jump to Answer

Comments

Mint-Innit

Well for the record it stopped again - every Tuesday at around mid day it stops.

atp-stopped.png

the message is clear enough about no active connections. However I use an apex app on this database on a daily basis - so if that's not an 'active connection' I don't know what is. The documentation doesn't define what 'active connection' means anywhere that I've found.

Bit of a showstopper really, it certainly makes it unusable for any serious development or other use. The cynic in me worries that this is 'by design' by Oracle to 'encourage' people to move to a paid instance...

Cheers.

Natalie G

"After being inactive for 7 days, the database will be stopped automatically, preserving its stored data. Inactivity measurements leading up to 7 days are based on database connections. Successfully making a SQL*Net or HTTPS connection resets these measurements to zero." [ref] Is Apex making a HTTPS connection to the database, or simply flying around inside of it?

imo giving me something for nothing is not a hard sell, and asking me to check for mice once a week doesn't really change that.

Birch19
Answer

According to Dimitri Gielis blog Oracle have confirmed that their inactivity logic is not currently picking up APEX/ORDS connections properly, hence the shutdowns. Fix currently in development.

For more info: Dimitri Gielis Blog (Oracle Application Express - APEX): Free Oracle Cloud: 15. The request could not be mapped to any d… 

Marked as Answer by Mint-Innit · Nov 13 2019
Scott Wesley

If you're application truly has irregular use, it doesn't seem like an attractive option - when it should be.

Pavel_p

Hi,

this is just a minor problem. If it needs a connection once a week, then just take care of establishing such a connection yourself. Two VMs are a part of the free cloud, so create one if you haven't done yet, create a simple script that connects to your DB and schedule this script to be executed periodically. I would suggest to download SQLcl as it can be very conveniently invoked from the command line.

I think you should be able to accomplish this in a very short time.

Regards,

Pavel

InoL

Dimitri had this in his blog (a script to just connect to the db on a daily basis), but apparently he removed it (I think it was something like entry "13. Keep it running"). Maybe it wasn't the solution?

[Deleted User]

Aha, the VM's are running without any check for usage?

And if yes- why these but not the DB? (let me guess – less resources?)

I think it would be very gently, if they would implement something, that wakes up the database whenever it's "sleeping" and there is an  incoming call (e.g. APEX/https or whatever) detected.

May be a user gets an error message for the first attempt; however the next try could work…

Best Regards

Andre

Pavel_p

I'm not sure what you're asking for, I don't even suppose you're asking for something but since your post ends with a questionmark...

I did not read Dimitri's blogpost (I mean not this particular one) however I think it's something that trivial to write a simple script that establishes a connection, eventually executes a sql statement and disconnects, that I don't suppose it needs to be published. Something like

sqlplus user/pwd@instance <<EOF

select 1 from dual;

EOF

(assuming Oracle client is available and instance is defined in tnsnames.ora) and then just invoke it from cron.

Pavel_p

Hi Andre,

yes, VM's are running all the time (or I haven't reached the "timeout" yet, if there is any, it's definitely way higher than just one week).

I think it would be very gently, if they would implement something, that wakes up the database whenever it's "sleeping" and there is an  incoming call (e.g. APEX/https or whatever) detected.

It would not make any sense. They obviously want not to consume resources with idle DBs (and I perfectly understand the reasons why). If you want to keep your DB alive, just put some minimal time and effort yourself to keep it up and running (otherwise you don't really need it up and running).

In my opinion we have been given quite a lot of useful "toys" for free, so let's play with them

Regards,

Pavel

[Deleted User]

Hi Pavel,

Even if I don't think I can soften someone's heart :-)

I will try to explain:

  1. I think the possibility of the ADB (for free) is great!
  2. I use them for a small application (till now only this single one) in which I make addresses and historical pictures accessible to all for my former study mates group.
    Now everyone can keep their own contact details up to date and see those of others. Previously, Excel files were sent back and forth. Not so funny, isn't it?
  3. This is kind of a serious thing, too...and that's why it should work - anytime.
  4. And actually I don't need more than the ADB... And I don't want to have to take care of a VM only to keep the DB alive.
  5. For me this is a contradiction:
    On the one hand we propagate low code on the other hand we have to create such circumstances for ourselves.
  6. I do understand too they want not to consume resources with idle DBs.
    But seven days is definitely too short.
    Should I create a duty roster and determine who has to register once a week?

In my opinion we have been given quite a lot of useful stuff that we *could* use as "toys" for free - and if we *want*, play with them.
But life also has serious sides.
And nobody should say that the ADB is not suitable for it - even if it is for free.

I'm pretty sure there aren't (at least curently) thousands of "for free" ADBs.
And if that's the case, you certainly have to think about how to deal with it.
But why do they hinder prospective interested parties right at the beginning?

There are always arguments for and against.

But that's why we talk to each other :-)
Let's keep on talking! - and listening!

Thank you and best Regards

Andre

InoL

Indeed it was a rhetorical question. I only noticed that Dimitri removed his post, go I just guess that his solution didn't keep the database up and running. Just like logging into your Apex app doesn't keep the database running. Actually, I started my DB yesterday and it stopped again after 10 minutes, while I was working in Apex Builder!

Birch19

I think Dimitri removed the post as some objected and saw it as an abuse of the service to force it to stay active if it wasn't being used. Ironic really given the issue of active instances shutting down.

[Deleted User]

Hi,

My ADB-Instanz was down yesterday.

I was (for sure) connected less than 7 day ago.

a) SQL Developer

b) Service console

c( APEX-Builder and App

I think that's not how it was expected by all the folks wanting to use it for something usefull...

Regards

Andre

Mint-Innit

Hi all, well it's good that this generated some discussion :-)  A colleague mentioned Dimitri's blog to me this morning (I've been away for a few days). It looks like it was posted after I'd spent a week googling so does come up in the results now, and should indeed mean the issue is resolved soon.

Cheers.

Pavel_p

Hi Andre,

I also do think that the free ADB is great and I would really not want to be in APEX provider's shoes as this is something they cannot compete with. I'm still in evaluation process trying to figure out if it can be used for anything more serious than toying. I'm too old fashioned and in general I don't like any cloud solutions as all of them (I've seen so far) have some technical limitations what you can and can not do. In this particular case I really don't like that we cannot access Db filesystem (thus the Oracle Wallet) and the DB Admin user can not connect as SYSDBA, also we cannot access ORDS configuration, create/deploy our own apps to the middleware and so on... These are serious limitations we cannot cope with and either we decide that we can live without these features or create some workarounds.

Now to the point... Nothing is perfect. You decided to replace Excel-based "solution", which was certainly far from being perfect, with something (hopefully) better, i.e. APEX app. So far so good. The only downside is that the DB is being shut down, however the only thing that is needed is to connect to the instance with something else than APEX/ORDS (which keeps several connections opened all the time). As these connections are being kept open all the time anyway (please see connection pooling), it's probably not easy to distinguish if these connections are really being used, thus the requirement to sometimes connect with something else whether we like it or not. It's stated in the documentation that

  • After being inactive for 7 days, the database will be stopped automatically, preserving its stored data. Inactivity measurements leading up to 7 days are based on database connections. Successfully making a SQL*Net or HTTPS connection resets these measurements to zero.
  • A database that is automatically or manually stopped and stays inactive for 90 days, cumulative, may be reclaimed and permanently deleted. Inactivity measurements leading up to 90 days are based on the database being inactive or in the stopped state. Starting a stopped database resets these measurements to zero.

In other words (the way I understand it) they are telling us to establish a connection once in 7 days and start it once in 90 days to "prove" the DB is actively used.

We can have long discussions about it, we can disagree with such a policy, we may not like it but that's all we can do about it.

This is kind of a serious thing, too...and that's why it should work - anytime.

Ok, if it's a serious thing, than take care of keeping the DB up. Every day we have to deal with technical problems, things either do not work at all or work some different/unexpected way etc.. This is just a tiny problem that can be solved in a short time.

And actually I don't need more than the ADB... And I don't want to have to take care of a VM only to keep the DB alive.

You do, maybe you just don't know about it. Other limitations of the free ADB:

  • Always Free Autonomous Databases do not support full backups to your Oracle Cloud Infrastructure object storage.
  • Always Free Autonomous Databases do not support restoring from full backups.

If your project is at least remotely serious, you definitely should take care of backups "manually". This seems to be the right tool for the job, however I must admit that I haven't tried it personally yet. And if I'm not terribly mistaken, it's necessary to connect to the DB in order to create a backup. Problem solved.

I'm pretty sure there aren't (at least curently) thousands of "for free" ADBs.

How can you be so sure? Whenever something is for free, people tend to waste, so it's just natural to create some mechanisms to shutdown and eventually remove DB instances that are not being actively used and someone probably thought that this is the right way how to do so.

But why do they hinder prospective interested parties right at the beginning?

I think "hinder" is not the right word for what they do. Oracle guys are of course no altruists, they gave us quite a lot for free but naturally the intention is to make as many paying customers as possible out of "prospective interested parties" and it's a very common practice that free sw versions do not make our lives as easy as their paid counterparts.

Btw, have I mentioned that nothing is perfect?

Regards,

Pavel

Keyser

@thatjeffsmith (December 2nd)

https://twitter.com/thatjeffsmith/status/1201525144612683776

That patch has been deployed, ORDS/APEX activity is being properly accounted for now for measuring inactivity and database suspension after 7 days of no usage.

It may still be rolling out to various data centers/regions...

I think there were two bugs, bad maths which would affect your SQLcl activity and the HTTP ingress not counting at all - both should be fixed

I've had no issues since that tweet from Jeff, fingers crossed

[Deleted User]

Yea, Twitter is fancy and cool.

You can even learn important things e.g. who like what kind of beer most.

Question:

Shall we too report bugs and issues via Twitter in the future.

Andre

Mint-Innit

Keyser wrote:

@thatjeffsmith (December 2nd)

https://twitter.com/thatjeffsmith/status/1201525144612683776

That patch has been deployed, ORDS/APEX activity is being properly accounted for now for measuring inactivity and database suspension after 7 days of no usage.

Excellent. I had noticed that it did still seem to be running this week without me having to log into the tenancy. I never had any issue with the "use it or lose it" policy, only that APEX didn't seem to count as "using it" !

Cheers.

Keyser

mine just stopped again

(i connect to it every day)

jacknomiz

Hi, had to add my 2c worth ...

I wonder if the "7 day lack of activity" means - lack of apex development activity, or lack of apex app access activity.

From what I observed, I suspect the first option...

Mint-Innit

Welp, now APEX appears to have disappeared completely...!? No service alerts that I can see but whether I try to connecto my apex app or go through my resources -> development -> apex, all I get is 404 from RDS with "The request could not be mapped to any database. Check the request URL is correct, and that URL to database mappings have been correctly configured"

I've not changed anything , it stopped working three days ago.

Whilst I appreciate why there's no support for the free tier, surely people are unlikely to move to paid if they're trying the system out and can't get help when there are issues?  I'll have to try the OCI CCC forums as there's no feedback from the system itself as to why things are not working (everything is showing green that I can find!)

Cheers,

Frustrated OCI user!

Keyser

I got this again a couple of days ago

I went to the cloud database control panel and it said that the database was up and running fine, everything was green

I didn't believe it was (i was unable to connect to the database using any method, including the cloud sqldeveloper)

so i stopped and started the database and everything was fine again

Mint-Innit

Keyser wrote:

I got this again a couple of days ago

I went to the cloud database control panel and it said that the database was up and running fine, everything was green

I didn't believe it was (i was unable to connect to the database using any method, including the cloud sqldeveloper)

so i stopped and started the database and everything was fine again

YES! Thanks.. I've been in I.T. for mumbly-five years, why on earth didn't I think of turning it off-and-on again.. D'oh!

It's working again now (slowly... but it is working)  :-)

Cheers.

Keyser

database queries seem to be fine in sqlDeveloper but anything Apex related is very erratic, both the Apex builder and the runtime will be fine for a couple of minutes and then spinning wheels everywhere for ages and then stops with "Error: Gateway Time-out", i have no idea how to diagnose this...

pastedImage_2.png

i had my cloud compute instance terminated yesterday for no good reason (along with a few others https://cloudcustomerconnect.oracle.com/posts/8a3a7d0d8c ), it's all working again now but combined with the database outages and apex builder grinding to a halt i'm on a bit of a downer with the "always free" environment at the moment

Mint-Innit

Keyser wrote:

database queries seem to be fine in sqlDeveloper but anything Apex related is very erratic, both the Apex builder and the runtime will be fine for a couple of minutes and then spinning wheels everywhere for ages and then stops with "Error: Gateway Time-out", i have no idea how to diagnose this...

Can confirm that I'm also seeing sporadic performance issues that weren't there before - sometimes (simple - single item) forms don't submit, sometimes you have to click twice, sometimes forms don't reload. Lots of spinning.. not had any timeouts yet though. My tenancy is UK/London & the OCI health page says everything is hunky dory.

Hey ho.

[Deleted User]

Hi "Oracle"

https://twitter.com/StewAshton/status/1207605208748040197

I've seen Stew at two presentations last year. I know some of his posts.

I think he's a smart and very pleasant person...

... and he is (unfortunately) right.

Guys, this is not the way to do this.

You're breaking more things than you probably realize right now.

Starting tomorrow, the days will get longer again - use them.

Use them!

Please.

Merry Christmas to you all.

Andre

User_LQHPE

I'm having this same unpleasant event here too... In less than 5 minutes my database stops. I don't know if I am doing something wrong, or if this is due to the fact that I created a database a few months ago. I didn't use it (but I have already terminated that one and I'm using this newer one)... Or if this is what it is supposed to be: you create a DB, run it for a few minutes, store the data and it shuts down. Anyway, I'm kinda lost here lol

1 - 27

Post Details

Added on Nov 6 2019
27 comments
2,869 views