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 8844329
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T11:27:34+00:00 2026-06-14T11:27:34+00:00

I run a service that creates many SQLITE3 databases and later on removes them

  • 0

I run a service that creates many SQLITE3 databases and later on removes them again, they live for about a day maybe. They all have the same schema and start empty.

I use this to create a new blank SQLITE3 database:

sqlite3 newDatabase.db < myschema.sql

The myschema.sql file contains three table schemas or so, nothing fancy, no data. When I execute the above command on my rather fast, dedicated linux server, it takes up to 5 minutes to complete. There’s processes running in the background, like a couple of PHP scripts using CPU time, but everything else is fast, like other commands or inserting data into the DB later on. It’s just the creation that takes forever.

This is so weird, I have absolutely no idea what’s wrong here. So my only resort right now is to create a blank.db once, and just make a fresh copy from that rather than importing from a SQL schema.

Any idea what I messed up? I initially thought the noatime settings on linux were messing with it, but no, disabling didn’t change anything.

Willing to provide any configuration/data you need.

Edit:

This is what strace hangs at:
12:29:45.460852 fcntl(3, F_SETLK, {type=F_WRLCK, whence=SEEK_SET, start=1073741824, len=1}) = 0
12:29:45.460965 fcntl(3, F_SETLK, {type=F_WRLCK, whence=SEEK_SET, start=1073741826, len=510}) = 0
12:29:45.461079 lseek(4, 512, SEEK_SET) = 512
12:29:45.461550 read(4, "", 8)          = 0
12:29:45.462639 fdatasync(4
  • 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-06-14T11:27:36+00:00Added an answer on June 14, 2026 at 11:27 am

    A possibility is to use the strace command to see what’s happens :

    strace -f -s 1000 -tt sqlite3 newDatabase.db < myschema.sql
    

    If it hangs somewhere, you will see.

    Is your schema is HUGE ?

    NOTE

    • in case of questioning about too high I/O disk, try the command iotop -oPa, you will see “who’s” put the mess in your system
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've created a multi-threaded service that uses Castle Windsor to create components to run
Here is what I have in mind: 1) Create a service that will run
I am building a WCF service that will expose several operations, it will run
I've been tasked to write a high performance, high availability service that will run
I have a Java application that run as a background service, i.e. no GUI.
Working on a service application in Delphi 5 that is intended to run on
I need to run a script every night that connects to a Web Service
I have a web service to which users upload python scripts that are run
I've seen some apps that run as a windows service but can still provide
I have a windows service written in C# that creates a truck load of

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.