|
Post by pierre on Jun 8, 2013 9:53:53 GMT -5
I am testing my app on my home WiFi network, prior to letting my friends loose on it. When I run the app on 2 PCs, and click a button on each PC simultaneously to execute a query (not necessarily the same one), I frequently get a page saying:
Error: "/seaside/go/%5Cdefault.css/runbasicpersonal" not found.
I have seen the 2 posts in "Run BASIC Coding Questions" (from ajmcgee , Jun 7, 2011) and in "Bug Reports" (from melvin2001, Jun 12, 2009), but neither has a solution.
Please, is there a fix for this ? I have tried journal_mode=WAL, synchronous=0, locking_mode=NORMAL (and other suggested combinations), but nothing has stopped it yet.
(My Run BASIC Console says it is v1.01, build 2.44)
It would be great to get this resolved. Compared to other methods of building web apps, this is by far the most useable and friendly system I have found, and I am keen to stick with it.
Many thanks.
|
|
|
Post by pierre on Jun 8, 2013 10:36:57 GMT -5
Or ... (just a thought - no evidence behind it): is this something that crops up only when using localhost ? I am running localhost on Win XP SP3.
Does this problem ever occur when using a "real" server ?
|
|
|
Post by StefanPendl on Jun 9, 2013 13:55:45 GMT -5
Did you try searching for a solution that is related to default.css?
In general SQLite is not enabled for multi-user-mode.
|
|
|
Post by pierre on Jun 10, 2013 15:33:45 GMT -5
Firstly, thank you for your reply, Stefan - much appreciated.
Regarding the comment about SQLite: I had got the impression that together with WAL (write-ahead logging), SQLite was quite good at low to medium volumes for multiple users. Surely Run BASIC online apps are not restricted to one user at a time ?
Please could someone put me straight on this. My aim is to write a small online system, to be queried and/or updated perhaps 3 or 4 times a day in total, by up to 30 users, using SQLite, and "hobbyist" level web hosting. Is this feasible with Run BASIC ? I really hope so.
Many thanks.
|
|
|
Post by meerkat on Jun 11, 2013 0:16:03 GMT -5
For some reason SQLite locking is a major problem with Run BASIC. I've run into this many times, and in some cases I was not able to solve it. Have you tried: #sqlHandle execute("PRAGMA read_uncommitted=1") Some information here: www.sqlite.org/sharedcache.htmlGood luck. Dan
|
|
|
Post by pierre on Jun 11, 2013 6:43:00 GMT -5
Thanks Stefan and Meekat for the heads-up on this. "PRAGMA read_uncommitted=1" looks as though it should reduce the occurrence of locks in a big way - I will try it out.
I am now going to press ahead with the project, and see how it turns out. With a low number of users, and a bit of user education, hopefully this will be a workable solution. Looking forward to the day when we can use other databases as well, but even so, what a great bit of software Run BASIC is - I'm really impressed.
|
|
|
Post by StefanPendl on Jun 11, 2013 12:08:42 GMT -5
You could block DB access while another user is using your application with a flag file or similar.
|
|
|
Post by pierre on Jun 12, 2013 9:28:38 GMT -5
Good idea Stefan - I'll try this over the weekend. Something along the lines of: trap the DB lock, and issue a message like "DB busy - press 'try again' or 'go back'".
By the time the user has pressed 'try again', the lock should have cleared.
Thanks for your help.
|
|
|
Post by StefanPendl on Jun 13, 2013 11:11:47 GMT -5
Sorry, but you can't trap the locking of the DB file, this will just freeze the session.
I would create a file if a user starts your application. This file would be checked for its existence during the start.
Pseudo code:
If flag file exists notify user of the application being used and try again in a minute. If it doesn't exist create it and proceed with the start of the application. After the session has ended delete the flag file.
|
|
|
Post by pierre on Jun 15, 2013 6:31:31 GMT -5
OK, message received. I'm gathering up my strength to re-write it, using a combination of sequential and random access files. I will still try to use the "flag file" idea to prevent locks on these flat files, though - hopefully this should work.
Thanks for all the info. Deep breath, and here we go again !
|
|
|
Post by pierre on Jun 15, 2013 9:33:02 GMT -5
Just to let people know, even using only sequential files, with a home-grown locking mechanism, I still get the "/seaside/go/%5Cdefault.css/" message (though not quite as often).
So, this message is not connected to SQLite; it is presumably an issue with whatever sits behind Run BASIC. Oh well, back to the drawing board.
|
|
|
Post by StefanPendl on Jun 15, 2013 19:05:50 GMT -5
Can you comment out any command that involves CSS?
Can you uncomment them one by one and check when it gets astray?
|
|
|
Post by StefanPendl on Jun 15, 2013 19:08:56 GMT -5
I just did another search and found the following: Searching this forum for the past 7000 days for "default.css" returned the following hit: default.css not foundWhen searching make sure to increase the days to at least two years, since searching within the last 7 days just gets no hits at all in most cases.
|
|
|
Post by pierre on Jun 17, 2013 10:12:27 GMT -5
OK ... I commented out all commands that involve CSS, and got rid of all SQLite calls, in a really cut-down bit of code. I still get the error page. It happens whenever the server is doing something meaty, and while it is doing that, a link (or button) is clicked.
For example: I set up a page (call it [mainPage]), which does a "cls", and then loads and renders a small picture file. It also has links to a different page. Navigate away from [mainPage], using 2 PCs both connected to that application, then press a button or link to return to [mainPage]. If you press both "return" buttons more or less at the same time, the /seaside/go/..." error page appears (this is using localhost).
So, it looks like the server can't cope with a request arriving when it is already busy doing something.
Thanks for the other link, Stefan (default.css not found). However, I had already read that one; unfortunately it doesn't end with a solution.
|
|