Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3458630
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T10:00:24+00:00 2026-05-18T10:00:24+00:00

I’m part way through building a fairly complex HTML5 web app, that retrieves its

  • 0

I’m part way through building a fairly complex HTML5 web app, that retrieves its data from a Web Service to populate the Web SQL databse.

All was going well with the test data, then I tried using some real data (a table with around 10 cols and over 180,000 rows) and ran into some issues.

I am sending the SQL responses in “chunks” of 500 inserts and then running a transaction and grabbing the next response from the Web Service. This works fine, until the table gets to around 9000 rows and then it just won’t take any more. At this point the database file size is still under 2MB and I have the max size set to 20MB, so I don’t think that is the issue.

I have managed to recreate a similar issue with simpler code, so others can see what I am talking about. (For some reason I can’t get it all to stay in the “code block” (sorry))

//var qsParm = new Array();

var bigData = {};
bigData.webdb = {};

var readOnly = false;

bigData.webdb.open = function() {
    bigData.webdb.db = null;
    var dbSize = 20 * 1024 * 1024; // 20MB
    infinity.webdb.db = openDatabase('bigData', '', 'bigData DATA', dbSize);   
};

bigData.webdb.onError = function(tx, e) {
    alert('Something unexpected happened: ' + e.message);
};


bigData.webdb.createTable = function() {
    var db = bigData.webdb.db;
    db.transaction(function(tx) {        
        tx.executeSql("CREATE TABLE IF NOT EXISTS [MattTest] ([Foo] VARCHAR(32) PRIMARY KEY ASC, [Bar] VARCHAR(20), [Will] VARCHAR(100), [Smith] VARCHAR(100))", []);

    });

    db.transaction(function(tx) {
        var i=0;
        for(i=0; i<19000; i++)

            tx.executeSql("INSERT INTO [MattTest] (Foo, Bar, Will, Smith) VALUES (?,?,?,?)", ['Foo' + i, 'Bar', 'Now this is the story all about how My life got flipped turned upside down', 'And Id like to take a minute just sit right there Ill tell you how I became the prince of a town called Bel Air']);
        }

    });
};

Please ignore the string value, its just something to pad out the varchar size (SQLite doesn’t appear to pad a char type).

At the “19000” iterations above (or any number below) the table will be created in Chrome, with all of the data entered correctly. The database will be around 4MB. Safari will let me add more rows and I have had the DB size up to around 10MB in Safari.

If I try to delete the contents of the table and increase the number of iterations to 20,000, Chrome does not finish the transaction.

Does anyone have any ideas as to what might be causing this?

I hope I have explained the issue in enough detail. Please feel free to ask any questions, if I have been too vague.

Thanks for your help.

Update: I have tried adding some error handling and the response is “constraint failed”. I’ve done a bit of research into what may be causing this, but I’m still struggling to find an answer.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T10:00:25+00:00Added an answer on May 18, 2026 at 10:00 am

    I think you are hitting a hard-coded 5MB WebSQL DB size limit of Chrome. I can verify your code failing as you describe, just as the db size busts through 5120K on (the latest) Chrome v8.0.552.215

    The error message indicates that allowed memory has been exceeded, etc. As far as I know Chrome does not utilize the WebSQL DB size params.

    More discussion about this on the Chromium group

    The constraint error may be a separate issue as you can elicit such an error by attempting to INSERT a duplicate record. Simply running your insert sample code more than once without tweaking the iteration init and bounds params can cause this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I've got a string that has curly quotes in it. I'd like to replace
link Im having trouble converting the html entites into html characters, (&# 8217;) i
Seemingly simple, but I cannot find anything relevant on the web. What is the
Does anyone know how can I replace this 2 symbol below from the string
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I have a bunch of posts stored in text files formatted in yaml/textile (from
I am trying to loop through a bunch of documents I have to put

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.