[GH-ISSUE #90] Error when a trying to mirror large number of repos #47

Closed
opened 2026-02-27 15:54:47 +03:00 by kerem · 15 comments
Owner

Originally created by @sunny-g on GitHub (Sep 7, 2025).
Original GitHub issue: https://github.com/RayLabsHQ/gitea-mirror/issues/90

Originally assigned to: @arunavo4 on GitHub.

When trying to mirror my github account, I'm repeatedly running into an issue mirroring my starred repositories (4.6k). However, when just focusing on everything else, there doesn't seem any issue (thanks for the great project btw).

What other info can I provide for you?

gitea-mirror: v3.5.4

gitea-mirror  | 2025-09-07T20:16:02.363007566Z Error in GitHub data sync: 168 |     return this._prepare().get(placeholderValues);
gitea-mirror  | 2025-09-07T20:16:02.363054722Z 169 |   };
gitea-mirror  | 2025-09-07T20:16:02.363064219Z 170 |   values = (placeholderValues) => {
gitea-mirror  | 2025-09-07T20:16:02.363071741Z 171 |     return this._prepare().values(placeholderValues);
gitea-mirror  | 2025-09-07T20:16:02.363078535Z 172 |   };
gitea-mirror  | 2025-09-07T20:16:02.363084953Z 173 |   async execute() {
gitea-mirror  | 2025-09-07T20:16:02.363091924Z                         ^
gitea-mirror  | 2025-09-07T20:16:02.363098069Z error: SQLite query expected 37133 values, received 102669
gitea-mirror  | 2025-09-07T20:16:02.363106389Z       at #run (bun:sqlite:184:103)
gitea-mirror  | 2025-09-07T20:16:02.363112591Z       at execute (/app/node_modules/drizzle-orm/sqlite-core/query-builders/insert.js:173:19)
gitea-mirror  | 2025-09-07T20:16:02.363118855Z       at then (/app/node_modules/drizzle-orm/query-promise.js:21:17)
gitea-mirror  | 2025-09-07T20:16:02.363150883Z 
gitea-mirror  | 2025-09-07T20:16:02.363159412Z Error name: Error
gitea-mirror  | 2025-09-07T20:16:02.363165711Z Error message: SQLite query expected 37133 values, received 102669
gitea-mirror  | 2025-09-07T20:16:02.363177161Z Error stack: Error: SQLite query expected 37133 values, received 102669
gitea-mirror  | 2025-09-07T20:16:02.363183692Z     at run (unknown)
gitea-mirror  | 2025-09-07T20:16:02.363189928Z     at #run (bun:sqlite:184:103)
gitea-mirror  | 2025-09-07T20:16:02.363196140Z     at execute (/app/node_modules/drizzle-orm/sqlite-core/query-builders/insert.js:173:19)
gitea-mirror  | 2025-09-07T20:16:02.363202587Z     at then (/app/node_modules/drizzle-orm/query-promise.js:21:17)
gitea-mirror  | 2025-09-07T20:16:02.363208898Z     at processTicksAndRejections (native:7:39)
Originally created by @sunny-g on GitHub (Sep 7, 2025). Original GitHub issue: https://github.com/RayLabsHQ/gitea-mirror/issues/90 Originally assigned to: @arunavo4 on GitHub. When trying to mirror my github account, I'm repeatedly running into an issue mirroring my starred repositories (4.6k). However, when just focusing on everything else, there doesn't seem any issue (thanks for the great project btw). What other info can I provide for you? gitea-mirror: v3.5.4 ``` gitea-mirror | 2025-09-07T20:16:02.363007566Z Error in GitHub data sync: 168 | return this._prepare().get(placeholderValues); gitea-mirror | 2025-09-07T20:16:02.363054722Z 169 | }; gitea-mirror | 2025-09-07T20:16:02.363064219Z 170 | values = (placeholderValues) => { gitea-mirror | 2025-09-07T20:16:02.363071741Z 171 | return this._prepare().values(placeholderValues); gitea-mirror | 2025-09-07T20:16:02.363078535Z 172 | }; gitea-mirror | 2025-09-07T20:16:02.363084953Z 173 | async execute() { gitea-mirror | 2025-09-07T20:16:02.363091924Z ^ gitea-mirror | 2025-09-07T20:16:02.363098069Z error: SQLite query expected 37133 values, received 102669 gitea-mirror | 2025-09-07T20:16:02.363106389Z at #run (bun:sqlite:184:103) gitea-mirror | 2025-09-07T20:16:02.363112591Z at execute (/app/node_modules/drizzle-orm/sqlite-core/query-builders/insert.js:173:19) gitea-mirror | 2025-09-07T20:16:02.363118855Z at then (/app/node_modules/drizzle-orm/query-promise.js:21:17) gitea-mirror | 2025-09-07T20:16:02.363150883Z gitea-mirror | 2025-09-07T20:16:02.363159412Z Error name: Error gitea-mirror | 2025-09-07T20:16:02.363165711Z Error message: SQLite query expected 37133 values, received 102669 gitea-mirror | 2025-09-07T20:16:02.363177161Z Error stack: Error: SQLite query expected 37133 values, received 102669 gitea-mirror | 2025-09-07T20:16:02.363183692Z at run (unknown) gitea-mirror | 2025-09-07T20:16:02.363189928Z at #run (bun:sqlite:184:103) gitea-mirror | 2025-09-07T20:16:02.363196140Z at execute (/app/node_modules/drizzle-orm/sqlite-core/query-builders/insert.js:173:19) gitea-mirror | 2025-09-07T20:16:02.363202587Z at then (/app/node_modules/drizzle-orm/query-promise.js:21:17) gitea-mirror | 2025-09-07T20:16:02.363208898Z at processTicksAndRejections (native:7:39) ```
kerem closed this issue 2026-02-27 15:54:47 +03:00
Author
Owner

@Tailscale-VPS commented on GitHub (Sep 8, 2025):

@sunny-g Pls provide the repo url.
Also the env variables u were using, redact info

<!-- gh-comment-id:3266774710 --> @Tailscale-VPS commented on GitHub (Sep 8, 2025): @sunny-g Pls provide the repo url. Also the env variables u were using, redact info
Author
Owner

@sunny-g commented on GitHub (Sep 8, 2025):

Don't think I can provide a repo URL, as the job is failing just when trying to "mirror starred repositories" - here's a more complete log output when running the following configuration:

Image
gitea-mirror  | Job f2111b51-4d73-4260-b0f6-caa96d762c6b has no log data
gitea-mirror  | Job f48b49c4-9bc4-40f3-914d-3001dece166f has no log data
gitea-mirror  | Job f5188695-6bcb-49cc-a6b7-05d6b5ca11e4 has no log data
gitea-mirror  | Job 20c069fc-0cb2-4a1e-89ac-0a1a5af007dd has no log data
gitea-mirror  | Job 14a26ee6-4403-4758-aae2-3a74a9d5f6df has no log data
gitea-mirror  | Job c399c474-4eb2-429b-b611-a98519fad9eb has no log data
gitea-mirror  | Job b9940d18-badd-4ec4-b2d6-0abd609676b1 has no log data
gitea-mirror  | Job d6067c56-2b71-4be0-b622-7b5d53746f58 has no log data
gitea-mirror  | Job 86990963-ae87-422c-bc49-e701aaf85e33 has no log data
gitea-mirror  | Job ef2b3fc9-902e-44cc-b8ba-96c149b71244 has no log data
gitea-mirror  | [Scheduler] Processing 1 valid configurations (out of 1 with scheduling enabled)
gitea-mirror  | [Scheduler] Skipping user <user> - next run at 2025-09-08T18:36:03.011Z
gitea-mirror  | Job f2111b51-4d73-4260-b0f6-caa96d762c6b has no log data
gitea-mirror  | Job f48b49c4-9bc4-40f3-914d-3001dece166f has no log data
gitea-mirror  | Job f5188695-6bcb-49cc-a6b7-05d6b5ca11e4 has no log data
gitea-mirror  | Job 20c069fc-0cb2-4a1e-89ac-0a1a5af007dd has no log data
gitea-mirror  | Job 14a26ee6-4403-4758-aae2-3a74a9d5f6df has no log data
gitea-mirror  | Job c399c474-4eb2-429b-b611-a98519fad9eb has no log data
gitea-mirror  | Job b9940d18-badd-4ec4-b2d6-0abd609676b1 has no log data
gitea-mirror  | Job d6067c56-2b71-4be0-b622-7b5d53746f58 has no log data
gitea-mirror  | Job 86990963-ae87-422c-bc49-e701aaf85e33 has no log data
gitea-mirror  | Job ef2b3fc9-902e-44cc-b8ba-96c149b71244 has no log data
gitea-mirror  | [Scheduler] Processing 1 valid configurations (out of 1 with scheduling enabled)
gitea-mirror  | [Scheduler] Running scheduled sync for user <user>
gitea-mirror  | [Scheduler] Using interval source for user <user>: 0 */6 * * *
gitea-mirror  | [Scheduler] Parsed interval "0 */6 * * *" as 6h
gitea-mirror  | [Scheduler] Next sync for user <user> scheduled for: 2025-09-08T22:33:04.187Z (in 6h)
gitea-mirror  | [Scheduler] Checking for new GitHub repositories for user <user>...
gitea-mirror  | [Scheduler] Scheduler is already running, skipping this cycle
gitea-mirror  | Error in GitHub data sync: 168 |     return this._prepare().get(placeholderValues);
gitea-mirror  | 169 |   };
gitea-mirror  | 170 |   values = (placeholderValues) => {
gitea-mirror  | 171 |     return this._prepare().values(placeholderValues);
gitea-mirror  | 172 |   };
gitea-mirror  | 173 |   async execute() {
gitea-mirror  |                         ^
gitea-mirror  | error: SQLite query expected 37133 values, received 102669
gitea-mirror  |       at #run (bun:sqlite:184:103)
gitea-mirror  |       at execute (/app/node_modules/drizzle-orm/sqlite-core/query-builders/insert.js:173:19)
gitea-mirror  |       at then (/app/node_modules/drizzle-orm/query-promise.js:21:17)
gitea-mirror  | 
gitea-mirror  | Error name: Error
gitea-mirror  | Error message: SQLite query expected 37133 values, received 102669
gitea-mirror  | Error stack: Error: SQLite query expected 37133 values, received 102669
gitea-mirror  |     at run (unknown)
gitea-mirror  |     at #run (bun:sqlite:184:103)
gitea-mirror  |     at execute (/app/node_modules/drizzle-orm/sqlite-core/query-builders/insert.js:173:19)
gitea-mirror  |     at then (/app/node_modules/drizzle-orm/query-promise.js:21:17)
gitea-mirror  |     at processTicksAndRejections (native:7:39)

the service yaml:

  gitea-mirror:
    image: ghcr.io/raylabshq/gitea-mirror:v3.5.4
    container_name: gitea-mirror
    restart: unless-stopped
    depends_on: [gitea]
    user: 1000:1000
    environment:
      # === ABSOLUTELY REQUIRED ===
      # This MUST be set and CANNOT be changed via UI
      - BETTER_AUTH_SECRET=${BETTER_AUTH_SECRET} # configured in komodo
      - BETTER_AUTH_URL=http://${SELF_LAN_IP}:20081

      # === CORE SETTINGS ===
      # These are technically required but have working defaults
      - GITEA_URL=http://${SELF_LAN_IP}:20080
      - GITEA_USERNAME=sunny-g
      - GITHUB_USERNAME=sunny-g

      # === MIRROR SETTINGS ===
      - INCLUDE_ARCHIVED=true
      - PRIVATE_REPOSITORIES=true
      - PUBLIC_REPOSITORIES=true
      - SKIP_FORKS=false
      - MIRROR_ISSUES=true
      - MIRROR_LABELS=true
      - MIRROR_METADATA=true
      - MIRROR_MILESTONES=true
      - MIRROR_ORGANIZATIONS=true
      - MIRROR_PULL_REQUESTS=true
      - MIRROR_RELEASES=true
      # - MIRROR_STARRED=true
      - MIRROR_WIKI=true
      - PRESERVE_ORG_STRUCTURE=true
      - SKIP_STARRED_ISSUES=true
      - STARRED_REPOS_ORG=github-stars

      # === SCHEDULE SETTINGS ===
      - AUTO_IMPORT_REPOS=true
      - SCHEDULE_ENABLED=true
      - SCHEDULE_INTERVAL='0 */6 * * *'
      - SCHEDULE_CONCURRENT=true
      - SCHEDULE_BATCH_SIZE=10
    volumes:
      - /mnt/user/appdata/gitea-mirror:/app/data
    ports:
      - 20081:4321
    healthcheck:
      test:
        [
          "CMD",
          "wget",
          "--no-verbose",
          "--tries=3",
          "--spider",
          "http://localhost:4321/api/health",
        ]
      interval: 30s
      timeout: 10s
      retries: 5
      start_period: 15s
<!-- gh-comment-id:3267099955 --> @sunny-g commented on GitHub (Sep 8, 2025): Don't think I can provide a repo URL, as the job is failing just when trying to "mirror starred repositories" - here's a more complete log output when running the following configuration: <img width="1104" height="1218" alt="Image" src="https://github.com/user-attachments/assets/a66f3cb1-ad16-4571-8e8a-d223c5f130b9" /> ``` gitea-mirror | Job f2111b51-4d73-4260-b0f6-caa96d762c6b has no log data gitea-mirror | Job f48b49c4-9bc4-40f3-914d-3001dece166f has no log data gitea-mirror | Job f5188695-6bcb-49cc-a6b7-05d6b5ca11e4 has no log data gitea-mirror | Job 20c069fc-0cb2-4a1e-89ac-0a1a5af007dd has no log data gitea-mirror | Job 14a26ee6-4403-4758-aae2-3a74a9d5f6df has no log data gitea-mirror | Job c399c474-4eb2-429b-b611-a98519fad9eb has no log data gitea-mirror | Job b9940d18-badd-4ec4-b2d6-0abd609676b1 has no log data gitea-mirror | Job d6067c56-2b71-4be0-b622-7b5d53746f58 has no log data gitea-mirror | Job 86990963-ae87-422c-bc49-e701aaf85e33 has no log data gitea-mirror | Job ef2b3fc9-902e-44cc-b8ba-96c149b71244 has no log data gitea-mirror | [Scheduler] Processing 1 valid configurations (out of 1 with scheduling enabled) gitea-mirror | [Scheduler] Skipping user <user> - next run at 2025-09-08T18:36:03.011Z gitea-mirror | Job f2111b51-4d73-4260-b0f6-caa96d762c6b has no log data gitea-mirror | Job f48b49c4-9bc4-40f3-914d-3001dece166f has no log data gitea-mirror | Job f5188695-6bcb-49cc-a6b7-05d6b5ca11e4 has no log data gitea-mirror | Job 20c069fc-0cb2-4a1e-89ac-0a1a5af007dd has no log data gitea-mirror | Job 14a26ee6-4403-4758-aae2-3a74a9d5f6df has no log data gitea-mirror | Job c399c474-4eb2-429b-b611-a98519fad9eb has no log data gitea-mirror | Job b9940d18-badd-4ec4-b2d6-0abd609676b1 has no log data gitea-mirror | Job d6067c56-2b71-4be0-b622-7b5d53746f58 has no log data gitea-mirror | Job 86990963-ae87-422c-bc49-e701aaf85e33 has no log data gitea-mirror | Job ef2b3fc9-902e-44cc-b8ba-96c149b71244 has no log data gitea-mirror | [Scheduler] Processing 1 valid configurations (out of 1 with scheduling enabled) gitea-mirror | [Scheduler] Running scheduled sync for user <user> gitea-mirror | [Scheduler] Using interval source for user <user>: 0 */6 * * * gitea-mirror | [Scheduler] Parsed interval "0 */6 * * *" as 6h gitea-mirror | [Scheduler] Next sync for user <user> scheduled for: 2025-09-08T22:33:04.187Z (in 6h) gitea-mirror | [Scheduler] Checking for new GitHub repositories for user <user>... gitea-mirror | [Scheduler] Scheduler is already running, skipping this cycle gitea-mirror | Error in GitHub data sync: 168 | return this._prepare().get(placeholderValues); gitea-mirror | 169 | }; gitea-mirror | 170 | values = (placeholderValues) => { gitea-mirror | 171 | return this._prepare().values(placeholderValues); gitea-mirror | 172 | }; gitea-mirror | 173 | async execute() { gitea-mirror | ^ gitea-mirror | error: SQLite query expected 37133 values, received 102669 gitea-mirror | at #run (bun:sqlite:184:103) gitea-mirror | at execute (/app/node_modules/drizzle-orm/sqlite-core/query-builders/insert.js:173:19) gitea-mirror | at then (/app/node_modules/drizzle-orm/query-promise.js:21:17) gitea-mirror | gitea-mirror | Error name: Error gitea-mirror | Error message: SQLite query expected 37133 values, received 102669 gitea-mirror | Error stack: Error: SQLite query expected 37133 values, received 102669 gitea-mirror | at run (unknown) gitea-mirror | at #run (bun:sqlite:184:103) gitea-mirror | at execute (/app/node_modules/drizzle-orm/sqlite-core/query-builders/insert.js:173:19) gitea-mirror | at then (/app/node_modules/drizzle-orm/query-promise.js:21:17) gitea-mirror | at processTicksAndRejections (native:7:39) ``` the service yaml: ``` gitea-mirror: image: ghcr.io/raylabshq/gitea-mirror:v3.5.4 container_name: gitea-mirror restart: unless-stopped depends_on: [gitea] user: 1000:1000 environment: # === ABSOLUTELY REQUIRED === # This MUST be set and CANNOT be changed via UI - BETTER_AUTH_SECRET=${BETTER_AUTH_SECRET} # configured in komodo - BETTER_AUTH_URL=http://${SELF_LAN_IP}:20081 # === CORE SETTINGS === # These are technically required but have working defaults - GITEA_URL=http://${SELF_LAN_IP}:20080 - GITEA_USERNAME=sunny-g - GITHUB_USERNAME=sunny-g # === MIRROR SETTINGS === - INCLUDE_ARCHIVED=true - PRIVATE_REPOSITORIES=true - PUBLIC_REPOSITORIES=true - SKIP_FORKS=false - MIRROR_ISSUES=true - MIRROR_LABELS=true - MIRROR_METADATA=true - MIRROR_MILESTONES=true - MIRROR_ORGANIZATIONS=true - MIRROR_PULL_REQUESTS=true - MIRROR_RELEASES=true # - MIRROR_STARRED=true - MIRROR_WIKI=true - PRESERVE_ORG_STRUCTURE=true - SKIP_STARRED_ISSUES=true - STARRED_REPOS_ORG=github-stars # === SCHEDULE SETTINGS === - AUTO_IMPORT_REPOS=true - SCHEDULE_ENABLED=true - SCHEDULE_INTERVAL='0 */6 * * *' - SCHEDULE_CONCURRENT=true - SCHEDULE_BATCH_SIZE=10 volumes: - /mnt/user/appdata/gitea-mirror:/app/data ports: - 20081:4321 healthcheck: test: [ "CMD", "wget", "--no-verbose", "--tries=3", "--spider", "http://localhost:4321/api/health", ] interval: 30s timeout: 10s retries: 5 start_period: 15s ```
Author
Owner

@Tailscale-VPS commented on GitHub (Sep 8, 2025):

Don't think I can provide a repo URL, as the job is failing just when trying to "mirror starred repositories" - here's a more complete log output when running the following configuration:

Image ``` gitea-mirror | Job f2111b51-4d73-4260-b0f6-caa96d762c6b has no log data gitea-mirror | Job f48b49c4-9bc4-40f3-914d-3001dece166f has no log data gitea-mirror | Job f5188695-6bcb-49cc-a6b7-05d6b5ca11e4 has no log data gitea-mirror | Job 20c069fc-0cb2-4a1e-89ac-0a1a5af007dd has no log data gitea-mirror | Job 14a26ee6-4403-4758-aae2-3a74a9d5f6df has no log data gitea-mirror | Job c399c474-4eb2-429b-b611-a98519fad9eb has no log data gitea-mirror | Job b9940d18-badd-4ec4-b2d6-0abd609676b1 has no log data gitea-mirror | Job d6067c56-2b71-4be0-b622-7b5d53746f58 has no log data gitea-mirror | Job 86990963-ae87-422c-bc49-e701aaf85e33 has no log data gitea-mirror | Job ef2b3fc9-902e-44cc-b8ba-96c149b71244 has no log data gitea-mirror | [Scheduler] Processing 1 valid configurations (out of 1 with scheduling enabled) gitea-mirror | [Scheduler] Skipping user - next run at 2025-09-08T18:36:03.011Z gitea-mirror | Job f2111b51-4d73-4260-b0f6-caa96d762c6b has no log data gitea-mirror | Job f48b49c4-9bc4-40f3-914d-3001dece166f has no log data gitea-mirror | Job f5188695-6bcb-49cc-a6b7-05d6b5ca11e4 has no log data gitea-mirror | Job 20c069fc-0cb2-4a1e-89ac-0a1a5af007dd has no log data gitea-mirror | Job 14a26ee6-4403-4758-aae2-3a74a9d5f6df has no log data gitea-mirror | Job c399c474-4eb2-429b-b611-a98519fad9eb has no log data gitea-mirror | Job b9940d18-badd-4ec4-b2d6-0abd609676b1 has no log data gitea-mirror | Job d6067c56-2b71-4be0-b622-7b5d53746f58 has no log data gitea-mirror | Job 86990963-ae87-422c-bc49-e701aaf85e33 has no log data gitea-mirror | Job ef2b3fc9-902e-44cc-b8ba-96c149b71244 has no log data gitea-mirror | [Scheduler] Processing 1 valid configurations (out of 1 with scheduling enabled) gitea-mirror | [Scheduler] Running scheduled sync for user gitea-mirror | [Scheduler] Using interval source for user : 0 */6 * * * gitea-mirror | [Scheduler] Parsed interval "0 */6 * * *" as 6h gitea-mirror | [Scheduler] Next sync for user scheduled for: 2025-09-08T22:33:04.187Z (in 6h) gitea-mirror | [Scheduler] Checking for new GitHub repositories for user ... gitea-mirror | [Scheduler] Scheduler is already running, skipping this cycle gitea-mirror | Error in GitHub data sync: 168 | return this._prepare().get(placeholderValues); gitea-mirror | 169 | }; gitea-mirror | 170 | values = (placeholderValues) => { gitea-mirror | 171 | return this._prepare().values(placeholderValues); gitea-mirror | 172 | }; gitea-mirror | 173 | async execute() { gitea-mirror | ^ gitea-mirror | error: SQLite query expected 37133 values, received 102669 gitea-mirror | at #run (bun:sqlite:184:103) gitea-mirror | at execute (/app/node_modules/drizzle-orm/sqlite-core/query-builders/insert.js:173:19) gitea-mirror | at then (/app/node_modules/drizzle-orm/query-promise.js:21:17) gitea-mirror | gitea-mirror | Error name: Error gitea-mirror | Error message: SQLite query expected 37133 values, received 102669 gitea-mirror | Error stack: Error: SQLite query expected 37133 values, received 102669 gitea-mirror | at run (unknown) gitea-mirror | at #run (bun:sqlite:184:103) gitea-mirror | at execute (/app/node_modules/drizzle-orm/sqlite-core/query-builders/insert.js:173:19) gitea-mirror | at then (/app/node_modules/drizzle-orm/query-promise.js:21:17) gitea-mirror | at processTicksAndRejections (native:7:39) ```

the service yaml:

  gitea-mirror:
    image: ghcr.io/raylabshq/gitea-mirror:v3.5.4
    container_name: gitea-mirror
    restart: unless-stopped
    depends_on: [gitea]
    user: 1000:1000
    environment:
      # === ABSOLUTELY REQUIRED ===
      # This MUST be set and CANNOT be changed via UI
      - BETTER_AUTH_SECRET=${BETTER_AUTH_SECRET} # configured in komodo
      - BETTER_AUTH_URL=http://${SELF_LAN_IP}:20081

      # === CORE SETTINGS ===
      # These are technically required but have working defaults
      - GITEA_URL=http://${SELF_LAN_IP}:20080
      - GITEA_USERNAME=sunny-g
      - GITHUB_USERNAME=sunny-g

      # === MIRROR SETTINGS ===
      - INCLUDE_ARCHIVED=true
      - PRIVATE_REPOSITORIES=true
      - PUBLIC_REPOSITORIES=true
      - SKIP_FORKS=false
      - MIRROR_ISSUES=true
      - MIRROR_LABELS=true
      - MIRROR_METADATA=true
      - MIRROR_MILESTONES=true
      - MIRROR_ORGANIZATIONS=true
      - MIRROR_PULL_REQUESTS=true
      - MIRROR_RELEASES=true
      # - MIRROR_STARRED=true
      - MIRROR_WIKI=true
      - PRESERVE_ORG_STRUCTURE=true
      - SKIP_STARRED_ISSUES=true
      - STARRED_REPOS_ORG=github-stars

      # === SCHEDULE SETTINGS ===
      - AUTO_IMPORT_REPOS=true
      - SCHEDULE_ENABLED=true
      - SCHEDULE_INTERVAL='0 */6 * * *'
      - SCHEDULE_CONCURRENT=true
      - SCHEDULE_BATCH_SIZE=10
    volumes:
      - /mnt/user/appdata/gitea-mirror:/app/data
    ports:
      - 20081:4321
    healthcheck:
      test:
        [
          "CMD",
          "wget",
          "--no-verbose",
          "--tries=3",
          "--spider",
          "http://localhost:4321/api/health",
        ]
      interval: 30s
      timeout: 10s
      retries: 5
      start_period: 15s

SO it never started mirroring for u?
Can u try changing the batch value to 100 or 500 (I'm not an expert , this may lead to overload your server/network/disk if low spec )
Also for testing u can change the schedule interval to 5 or 10m, u dont have to wait for hours to test.
If u can clean /mnt/user/appdata/gitea-mirror and start fresh its better, else deploy another temp comtainer.

Also just to be sure your repos haven't mirrored yet right? They are in imported state?
Because after the new update , Creating the 1st user and after the restarting the container will automatically start Repo mirror.

Not to troll or something
But how much space u have for archiving 4.6k repos 😅, also u are using auto mirroring, if i were u i would definitely do them manually and slowly (Not to get banned or blocked)

<!-- gh-comment-id:3267473956 --> @Tailscale-VPS commented on GitHub (Sep 8, 2025): > Don't think I can provide a repo URL, as the job is failing just when trying to "mirror starred repositories" - here's a more complete log output when running the following configuration: > > <img alt="Image" width="1104" height="1218" src="https://private-user-images.githubusercontent.com/2055636/486872228-a66f3cb1-ad16-4571-8e8a-d223c5f130b9.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NTczNTY4MTQsIm5iZiI6MTc1NzM1NjUxNCwicGF0aCI6Ii8yMDU1NjM2LzQ4Njg3MjIyOC1hNjZmM2NiMS1hZDE2LTQ1NzEtOGU4YS1kMjIzYzVmMTMwYjkucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDkwOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTA5MDhUMTgzNTE0WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MzcxNjMxZjY3NDllNjhmZDRiNzZmNzZmYTI1ZDEzNGJjZGU0N2I0OWY5MTIyODFiMTYxYzFjNTIxMzIwMjgyNCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.koi84cT4neM6RD0p4QHD_fZRhvcBTlrnL5WDdlbwyM4"> > ``` > gitea-mirror | Job f2111b51-4d73-4260-b0f6-caa96d762c6b has no log data > gitea-mirror | Job f48b49c4-9bc4-40f3-914d-3001dece166f has no log data > gitea-mirror | Job f5188695-6bcb-49cc-a6b7-05d6b5ca11e4 has no log data > gitea-mirror | Job 20c069fc-0cb2-4a1e-89ac-0a1a5af007dd has no log data > gitea-mirror | Job 14a26ee6-4403-4758-aae2-3a74a9d5f6df has no log data > gitea-mirror | Job c399c474-4eb2-429b-b611-a98519fad9eb has no log data > gitea-mirror | Job b9940d18-badd-4ec4-b2d6-0abd609676b1 has no log data > gitea-mirror | Job d6067c56-2b71-4be0-b622-7b5d53746f58 has no log data > gitea-mirror | Job 86990963-ae87-422c-bc49-e701aaf85e33 has no log data > gitea-mirror | Job ef2b3fc9-902e-44cc-b8ba-96c149b71244 has no log data > gitea-mirror | [Scheduler] Processing 1 valid configurations (out of 1 with scheduling enabled) > gitea-mirror | [Scheduler] Skipping user <user> - next run at 2025-09-08T18:36:03.011Z > gitea-mirror | Job f2111b51-4d73-4260-b0f6-caa96d762c6b has no log data > gitea-mirror | Job f48b49c4-9bc4-40f3-914d-3001dece166f has no log data > gitea-mirror | Job f5188695-6bcb-49cc-a6b7-05d6b5ca11e4 has no log data > gitea-mirror | Job 20c069fc-0cb2-4a1e-89ac-0a1a5af007dd has no log data > gitea-mirror | Job 14a26ee6-4403-4758-aae2-3a74a9d5f6df has no log data > gitea-mirror | Job c399c474-4eb2-429b-b611-a98519fad9eb has no log data > gitea-mirror | Job b9940d18-badd-4ec4-b2d6-0abd609676b1 has no log data > gitea-mirror | Job d6067c56-2b71-4be0-b622-7b5d53746f58 has no log data > gitea-mirror | Job 86990963-ae87-422c-bc49-e701aaf85e33 has no log data > gitea-mirror | Job ef2b3fc9-902e-44cc-b8ba-96c149b71244 has no log data > gitea-mirror | [Scheduler] Processing 1 valid configurations (out of 1 with scheduling enabled) > gitea-mirror | [Scheduler] Running scheduled sync for user <user> > gitea-mirror | [Scheduler] Using interval source for user <user>: 0 */6 * * * > gitea-mirror | [Scheduler] Parsed interval "0 */6 * * *" as 6h > gitea-mirror | [Scheduler] Next sync for user <user> scheduled for: 2025-09-08T22:33:04.187Z (in 6h) > gitea-mirror | [Scheduler] Checking for new GitHub repositories for user <user>... > gitea-mirror | [Scheduler] Scheduler is already running, skipping this cycle > gitea-mirror | Error in GitHub data sync: 168 | return this._prepare().get(placeholderValues); > gitea-mirror | 169 | }; > gitea-mirror | 170 | values = (placeholderValues) => { > gitea-mirror | 171 | return this._prepare().values(placeholderValues); > gitea-mirror | 172 | }; > gitea-mirror | 173 | async execute() { > gitea-mirror | ^ > gitea-mirror | error: SQLite query expected 37133 values, received 102669 > gitea-mirror | at #run (bun:sqlite:184:103) > gitea-mirror | at execute (/app/node_modules/drizzle-orm/sqlite-core/query-builders/insert.js:173:19) > gitea-mirror | at then (/app/node_modules/drizzle-orm/query-promise.js:21:17) > gitea-mirror | > gitea-mirror | Error name: Error > gitea-mirror | Error message: SQLite query expected 37133 values, received 102669 > gitea-mirror | Error stack: Error: SQLite query expected 37133 values, received 102669 > gitea-mirror | at run (unknown) > gitea-mirror | at #run (bun:sqlite:184:103) > gitea-mirror | at execute (/app/node_modules/drizzle-orm/sqlite-core/query-builders/insert.js:173:19) > gitea-mirror | at then (/app/node_modules/drizzle-orm/query-promise.js:21:17) > gitea-mirror | at processTicksAndRejections (native:7:39) > ``` > > the service yaml: > > ``` > gitea-mirror: > image: ghcr.io/raylabshq/gitea-mirror:v3.5.4 > container_name: gitea-mirror > restart: unless-stopped > depends_on: [gitea] > user: 1000:1000 > environment: > # === ABSOLUTELY REQUIRED === > # This MUST be set and CANNOT be changed via UI > - BETTER_AUTH_SECRET=${BETTER_AUTH_SECRET} # configured in komodo > - BETTER_AUTH_URL=http://${SELF_LAN_IP}:20081 > > # === CORE SETTINGS === > # These are technically required but have working defaults > - GITEA_URL=http://${SELF_LAN_IP}:20080 > - GITEA_USERNAME=sunny-g > - GITHUB_USERNAME=sunny-g > > # === MIRROR SETTINGS === > - INCLUDE_ARCHIVED=true > - PRIVATE_REPOSITORIES=true > - PUBLIC_REPOSITORIES=true > - SKIP_FORKS=false > - MIRROR_ISSUES=true > - MIRROR_LABELS=true > - MIRROR_METADATA=true > - MIRROR_MILESTONES=true > - MIRROR_ORGANIZATIONS=true > - MIRROR_PULL_REQUESTS=true > - MIRROR_RELEASES=true > # - MIRROR_STARRED=true > - MIRROR_WIKI=true > - PRESERVE_ORG_STRUCTURE=true > - SKIP_STARRED_ISSUES=true > - STARRED_REPOS_ORG=github-stars > > # === SCHEDULE SETTINGS === > - AUTO_IMPORT_REPOS=true > - SCHEDULE_ENABLED=true > - SCHEDULE_INTERVAL='0 */6 * * *' > - SCHEDULE_CONCURRENT=true > - SCHEDULE_BATCH_SIZE=10 > volumes: > - /mnt/user/appdata/gitea-mirror:/app/data > ports: > - 20081:4321 > healthcheck: > test: > [ > "CMD", > "wget", > "--no-verbose", > "--tries=3", > "--spider", > "http://localhost:4321/api/health", > ] > interval: 30s > timeout: 10s > retries: 5 > start_period: 15s > ``` SO it never started mirroring for u? Can u try changing the batch value to 100 or 500 (I'm not an expert , this may lead to overload your server/network/disk if low spec ) Also for testing u can change the schedule interval to 5 or 10m, u dont have to wait for hours to test. If u can clean /mnt/user/appdata/gitea-mirror and start fresh its better, else deploy another temp comtainer. Also just to be sure your repos haven't mirrored yet right? They are in imported state? Because after the new update , Creating the 1st user and after the restarting the container will automatically start Repo mirror. **Not to troll or something** But how much space u have for archiving 4.6k repos 😅, also u are using auto mirroring, if i were u i would definitely do them manually and slowly (Not to get banned or blocked)
Author
Owner

@sunny-g commented on GitHub (Sep 8, 2025):

SO it never started mirroring for u?

Correct - I originally started with this config, enabling everything and nothing was imported or migrated. I then nuked the gitea-mirror directory, started over with a barebones config, and was able to import AND migrate ~480 personal repos.

Also just to be sure your repos haven't mirrored yet right? They are in imported state?

My own are imported and migrated (in gitea), and look great! The issue here is solely regarding "expanding" the space of imports and migrations to include starred repos.

Not to troll or something

No problem - I've had a github account since 2012 or something, and have TBs of space so not worried :)

also u are using auto mirroring, if i were u i would definitely do them manually and slowly (Not to get banned or blocked)

How do I do this from within the UI? I'm seemingly not able to even just get the list of starred repos successfully ingested (though in some logs I can see that they are being retrieved)

Ultimately, it seems like SQLite query expected 37133 values, received 102669 is suggesting a query/insert statement size issue, though I havent dug into the codebase deep enough to confirm.

However, I'll try your suggestions as soon as I can. Thank you!

<!-- gh-comment-id:3267689432 --> @sunny-g commented on GitHub (Sep 8, 2025): > SO it never started mirroring for u? Correct - I originally started with this config, enabling everything and nothing was imported or migrated. I then nuked the gitea-mirror directory, started over with a barebones config, and was able to import AND migrate ~480 personal repos. > Also just to be sure your repos haven't mirrored yet right? They are in imported state? My own are imported and migrated (in gitea), and look great! The issue here is solely regarding "expanding" the space of imports and migrations to include starred repos. > Not to troll or something No problem - I've had a github account since 2012 or something, and have TBs of space so not worried :) > also u are using auto mirroring, if i were u i would definitely do them manually and slowly (Not to get banned or blocked) How do I do this from within the UI? I'm seemingly not able to even just get the list of starred repos successfully ingested (though in some logs I can see that they are being retrieved) Ultimately, it seems like `SQLite query expected 37133 values, received 102669` is suggesting a query/insert statement size issue, though I havent dug into the codebase deep enough to confirm. However, I'll try your suggestions as soon as I can. Thank you!
Author
Owner

@Tailscale-VPS commented on GitHub (Sep 8, 2025):

SO it never started mirroring for u?

Correct - I originally started with this config, enabling everything and nothing was imported or migrated. I then nuked the gitea-mirror directory, started over with a barebones config, and was able to import AND migrate ~480 personal repos.

Also just to be sure your repos haven't mirrored yet right? They are in imported state?

My own are imported and migrated (in gitea), and look great! The issue here is solely regarding "expanding" the space of imports and migrations to include starred repos.

Not to troll or something

No problem - I've had a github account since 2012 or something, and have TBs of space so not worried :)

also u are using auto mirroring, if i were u i would definitely do them manually and slowly (Not to get banned or blocked)

How do I do this from within the UI? I'm seemingly not able to even just get the list of starred repos successfully ingested (though in some logs I can see that they are being retrieved)

Ultimately, it seems like SQLite query expected 37133 values, received 102669 is suggesting a query/insert statement size issue, though I havent dug into the codebase deep enough to confirm.

However, I'll try your suggestions as soon as I can. Thank you!

To turn off auto mirroring u need to check the env docs there are centain env , which when used will also enable auto mirror (like schedule/mirror interval i believe).

If u are not able to even just get the list of starred repos successfully, i believe its the massive 4.6k repo import which is failing probably due sqlite constraints.

Here i think what's the simple way of checking -
Deploy a new container with auto mirror off and then On Web UI click on import from github and check logs , if it still gives the same error then we can convert this issue into an enhancement/bug, If that happened then

Soultion Probably
Similarly like we have mirror batch in schedule we will need to implement a batch on import also OR a bit easier will be use the same env but use it for both mirror batch and import batch.
The 1st one gives the user more flexibility though because import is not really disk or network intensive , so users can have a high imoort value (Still should be under limits cuz we are sending requests to github), on the other hand mirror batch depends solely on how good your gitea server/network is.
Also i believe we are hitting different API when importing and when mirroring. Importing is just information based on your account but mirroring a repo includes the information,codebase,realesse,PR,atifacts,etc

<!-- gh-comment-id:3268054458 --> @Tailscale-VPS commented on GitHub (Sep 8, 2025): > > SO it never started mirroring for u? > > Correct - I originally started with this config, enabling everything and nothing was imported or migrated. I then nuked the gitea-mirror directory, started over with a barebones config, and was able to import AND migrate ~480 personal repos. > > > Also just to be sure your repos haven't mirrored yet right? They are in imported state? > > My own are imported and migrated (in gitea), and look great! The issue here is solely regarding "expanding" the space of imports and migrations to include starred repos. > > > Not to troll or something > > No problem - I've had a github account since 2012 or something, and have TBs of space so not worried :) > > > also u are using auto mirroring, if i were u i would definitely do them manually and slowly (Not to get banned or blocked) > > How do I do this from within the UI? I'm seemingly not able to even just get the list of starred repos successfully ingested (though in some logs I can see that they are being retrieved) > > Ultimately, it seems like `SQLite query expected 37133 values, received 102669` is suggesting a query/insert statement size issue, though I havent dug into the codebase deep enough to confirm. > > However, I'll try your suggestions as soon as I can. Thank you! To turn off auto mirroring u need to check the env docs there are centain env , which when used will also enable auto mirror (like schedule/mirror interval i believe). If u are not able to even just get the list of starred repos successfully, i believe its the massive 4.6k repo import which is failing probably due sqlite constraints. Here i think what's the simple way of checking - Deploy a new container with auto mirror off and then On Web UI click on import from github and check logs , if it still gives the same error then we can convert this issue into an enhancement/bug, If that happened then **Soultion Probably** Similarly like we have mirror batch in schedule we will need to implement a batch on import also OR a bit easier will be use the same env but use it for both mirror batch and import batch. The 1st one gives the user more flexibility though because import is not really disk or network intensive , so users can have a high imoort value (Still should be under limits cuz we are sending requests to github), on the other hand mirror batch depends solely on how good your gitea server/network is. Also i believe we are hitting different API when importing and when mirroring. Importing is just information based on your account but mirroring a repo includes the information,codebase,realesse,PR,atifacts,etc
Author
Owner

@arunavo4 commented on GitHub (Sep 9, 2025):

@sunny-g Please try out v3.6.0. And let me know if this fixes your issue. I have also added Github API rate limiting so that it can mirror your large number of repos.

<!-- gh-comment-id:3268964090 --> @arunavo4 commented on GitHub (Sep 9, 2025): @sunny-g Please try out v3.6.0. And let me know if this fixes your issue. I have also added Github API rate limiting so that it can mirror your large number of repos.
Author
Owner

@Jefferderp commented on GitHub (Sep 12, 2025):

I am currently experiencing this bug on v3.6.0 installed via docker-compose.yml.

Please let me know what logs I can provide or troubleshooting steps to take. Thanks!

GET /user/orgs?per_page=100 - 200 with id E166:170D5:3C36E:D859E:68C4AE73 in 153ms               
GET /user/repos?per_page=100 - 200 with id E180:AA91:34188:BC00F:68C4AE73 in 351ms
GET /user/starred?per_page=100 - 200 with id E176:22A7BC:328CD:B691B:68C4AE73 in 2524ms
GET /user/starred?per_page=100&page=2 - 200 with id E166:170D5:3CB20:DA162:68C4AE74 in 2409ms
GET /user/starred?per_page=100&page=3 - 200 with id E166:170D5:3D2EA:DBCE5:68C4AE78 in 2863ms
......
GET /user/starred?per_page=100&page=51 - 200 with id E166:170D5:54E7C:131662:68C4AEF6 in 2722ms
GET /user/starred?per_page=100&page=52 - 200 with id E166:170D5:55650:133201:68C4AEF9 in 2158ms
GET /user/starred?per_page=100&page=53 - 200 with id E166:170D5:55C60:134799:68C4AEFB in 1989ms
Error in GitHub data sync: 168 |     return this._prepare().get(placeholderValues);
169 |   };
170 |   values = (placeholderValues) => {
171 |     return this._prepare().values(placeholderValues);
172 |   };
173 |   async execute() {
                        ^
error: SQLite query expected 2820 values, received 133892
      at #run (bun:sqlite:184:103)
      at execute (/app/node_modules/drizzle-orm/sqlite-core/query-builders/insert.js:173:19)
      at then (/app/node_modules/drizzle-orm/query-promise.js:21:17)

Error name: Error
Error message: SQLite query expected 2820 values, received 133892
Error stack: Error: SQLite query expected 2820 values, received 133892
    at run (unknown)
    at #run (bun:sqlite:184:103)
    at execute (/app/node_modules/drizzle-orm/sqlite-core/query-builders/insert.js:173:19)
    at then (/app/node_modules/drizzle-orm/query-promise.js:21:17)
    at processTicksAndRejections (native:7:39)
<!-- gh-comment-id:3287148482 --> @Jefferderp commented on GitHub (Sep 12, 2025): I am currently experiencing this bug on v3.6.0 installed via `docker-compose.yml`. Please let me know what logs I can provide or troubleshooting steps to take. Thanks! ``` GET /user/orgs?per_page=100 - 200 with id E166:170D5:3C36E:D859E:68C4AE73 in 153ms GET /user/repos?per_page=100 - 200 with id E180:AA91:34188:BC00F:68C4AE73 in 351ms GET /user/starred?per_page=100 - 200 with id E176:22A7BC:328CD:B691B:68C4AE73 in 2524ms GET /user/starred?per_page=100&page=2 - 200 with id E166:170D5:3CB20:DA162:68C4AE74 in 2409ms GET /user/starred?per_page=100&page=3 - 200 with id E166:170D5:3D2EA:DBCE5:68C4AE78 in 2863ms ...... GET /user/starred?per_page=100&page=51 - 200 with id E166:170D5:54E7C:131662:68C4AEF6 in 2722ms GET /user/starred?per_page=100&page=52 - 200 with id E166:170D5:55650:133201:68C4AEF9 in 2158ms GET /user/starred?per_page=100&page=53 - 200 with id E166:170D5:55C60:134799:68C4AEFB in 1989ms Error in GitHub data sync: 168 | return this._prepare().get(placeholderValues); 169 | }; 170 | values = (placeholderValues) => { 171 | return this._prepare().values(placeholderValues); 172 | }; 173 | async execute() { ^ error: SQLite query expected 2820 values, received 133892 at #run (bun:sqlite:184:103) at execute (/app/node_modules/drizzle-orm/sqlite-core/query-builders/insert.js:173:19) at then (/app/node_modules/drizzle-orm/query-promise.js:21:17) Error name: Error Error message: SQLite query expected 2820 values, received 133892 Error stack: Error: SQLite query expected 2820 values, received 133892 at run (unknown) at #run (bun:sqlite:184:103) at execute (/app/node_modules/drizzle-orm/sqlite-core/query-builders/insert.js:173:19) at then (/app/node_modules/drizzle-orm/query-promise.js:21:17) at processTicksAndRejections (native:7:39) ```
Author
Owner

@arunavo4 commented on GitHub (Sep 13, 2025):

I am currently experiencing this bug on v3.6.0 installed via docker-compose.yml.

Please let me know what logs I can provide or troubleshooting steps to take. Thanks!

GET /user/orgs?per_page=100 - 200 with id E166:170D5:3C36E:D859E:68C4AE73 in 153ms               
GET /user/repos?per_page=100 - 200 with id E180:AA91:34188:BC00F:68C4AE73 in 351ms
GET /user/starred?per_page=100 - 200 with id E176:22A7BC:328CD:B691B:68C4AE73 in 2524ms
GET /user/starred?per_page=100&page=2 - 200 with id E166:170D5:3CB20:DA162:68C4AE74 in 2409ms
GET /user/starred?per_page=100&page=3 - 200 with id E166:170D5:3D2EA:DBCE5:68C4AE78 in 2863ms
......
GET /user/starred?per_page=100&page=51 - 200 with id E166:170D5:54E7C:131662:68C4AEF6 in 2722ms
GET /user/starred?per_page=100&page=52 - 200 with id E166:170D5:55650:133201:68C4AEF9 in 2158ms
GET /user/starred?per_page=100&page=53 - 200 with id E166:170D5:55C60:134799:68C4AEFB in 1989ms
Error in GitHub data sync: 168 |     return this._prepare().get(placeholderValues);
169 |   };
170 |   values = (placeholderValues) => {
171 |     return this._prepare().values(placeholderValues);
172 |   };
173 |   async execute() {
                        ^
error: SQLite query expected 2820 values, received 133892
      at #run (bun:sqlite:184:103)
      at execute (/app/node_modules/drizzle-orm/sqlite-core/query-builders/insert.js:173:19)
      at then (/app/node_modules/drizzle-orm/query-promise.js:21:17)

Error name: Error
Error message: SQLite query expected 2820 values, received 133892
Error stack: Error: SQLite query expected 2820 values, received 133892
    at run (unknown)
    at #run (bun:sqlite:184:103)
    at execute (/app/node_modules/drizzle-orm/sqlite-core/query-builders/insert.js:173:19)
    at then (/app/node_modules/drizzle-orm/query-promise.js:21:17)
    at processTicksAndRejections (native:7:39)

@Jefferderp how many repos do you have in total and when does it happen ? Does it happen at the start or after how many mirrors? Can you provide some more context. Also what is your config setup.
Cause I am trying to replicate this and it has not occurred on my end.

<!-- gh-comment-id:3287357184 --> @arunavo4 commented on GitHub (Sep 13, 2025): > I am currently experiencing this bug on v3.6.0 installed via `docker-compose.yml`. > > Please let me know what logs I can provide or troubleshooting steps to take. Thanks! > > > ``` > GET /user/orgs?per_page=100 - 200 with id E166:170D5:3C36E:D859E:68C4AE73 in 153ms > GET /user/repos?per_page=100 - 200 with id E180:AA91:34188:BC00F:68C4AE73 in 351ms > GET /user/starred?per_page=100 - 200 with id E176:22A7BC:328CD:B691B:68C4AE73 in 2524ms > GET /user/starred?per_page=100&page=2 - 200 with id E166:170D5:3CB20:DA162:68C4AE74 in 2409ms > GET /user/starred?per_page=100&page=3 - 200 with id E166:170D5:3D2EA:DBCE5:68C4AE78 in 2863ms > ...... > GET /user/starred?per_page=100&page=51 - 200 with id E166:170D5:54E7C:131662:68C4AEF6 in 2722ms > GET /user/starred?per_page=100&page=52 - 200 with id E166:170D5:55650:133201:68C4AEF9 in 2158ms > GET /user/starred?per_page=100&page=53 - 200 with id E166:170D5:55C60:134799:68C4AEFB in 1989ms > Error in GitHub data sync: 168 | return this._prepare().get(placeholderValues); > 169 | }; > 170 | values = (placeholderValues) => { > 171 | return this._prepare().values(placeholderValues); > 172 | }; > 173 | async execute() { > ^ > error: SQLite query expected 2820 values, received 133892 > at #run (bun:sqlite:184:103) > at execute (/app/node_modules/drizzle-orm/sqlite-core/query-builders/insert.js:173:19) > at then (/app/node_modules/drizzle-orm/query-promise.js:21:17) > > Error name: Error > Error message: SQLite query expected 2820 values, received 133892 > Error stack: Error: SQLite query expected 2820 values, received 133892 > at run (unknown) > at #run (bun:sqlite:184:103) > at execute (/app/node_modules/drizzle-orm/sqlite-core/query-builders/insert.js:173:19) > at then (/app/node_modules/drizzle-orm/query-promise.js:21:17) > at processTicksAndRejections (native:7:39) > ``` @Jefferderp how many repos do you have in total and when does it happen ? Does it happen at the start or after how many mirrors? Can you provide some more context. Also what is your config setup. Cause I am trying to replicate this and it has not occurred on my end.
Author
Owner

@Jefferderp commented on GitHub (Sep 13, 2025):

@arunavo4 This is a fresh setup of gitea-mirror. I click "Import GitHub Data" for the first time, and the scan consistently runs until page 53, where it ends with the above error. I assume page 53 is the final page, no error there. The error is thrown immediately afterwards.

GitHub says I have "5,000+" stars (wow!). Given that each request is for 100 repos, and there are 53 pages fetched, that comes out to ~5,300 repos. Seems like a match to me.

My docker-compose.yml is completely stock - all settings changed via the GUI. Screenshot:

Image

The "Test Connection" buttons for GitHub and Gitea both return a "Successfully connected" message. No issues there.

I've added a few more starred repos in the past day, and the error message has changed a bit:

GET /user/starred?per_page=100&page=51 - 200 with id A556:1C22A5:5C5219:14DEFC8:68C5A413 in 3013ms
GET /user/starred?per_page=100&page=52 - 200 with id A556:1C22A5:5C5BE9:14E1303:68C5A416 in 2417ms
GET /user/starred?per_page=100&page=53 - 200 with id A556:1C22A5:5C6343:14E2DD2:68C5A419 in 1980ms
Error in GitHub data sync: 168 |     return this._prepare().get(placeholderValues);
169 |   };
170 |   values = (placeholderValues) => {
171 |     return this._prepare().values(placeholderValues);
172 |   };
173 |   async execute() {
                        ^
error: SQLite query expected 2895 values, received 133967
      at #run (bun:sqlite:184:103)
      at execute (/app/node_modules/drizzle-orm/sqlite-core/query-builders/insert.js:173:19)
      at then (/app/node_modules/drizzle-orm/query-promise.js:21:17)

Error name: Error
Error message: SQLite query expected 2895 values, received 133967
Error stack: Error: SQLite query expected 2895 values, received 133967
    at run (unknown)
    at #run (bun:sqlite:184:103)
    at execute (/app/node_modules/drizzle-orm/sqlite-core/query-builders/insert.js:173:19)
    at then (/app/node_modules/drizzle-orm/query-promise.js:21:17)
    at processTicksAndRejections (native:7:39)
[Scheduler] Found 5286 new repositories for user AOwkXKTgVGY9XIOI13d7lTUiG6ayOpfp
[Scheduler] Checking for orphaned repositories to cleanup for user AOwkXKTgVGY9XIOI13d7lTUiG6ayOpfp...
[Scheduler] Failed to auto-import repositories for user AOwkXKTgVGY9XIOI13d7lTUiG6ayOpfp: 168 |     return this._prepare().get(placeholderValues);
169 |   };
170 |   values = (placeholderValues) => {
171 |     return this._prepare().values(placeholderValues);
172 |   };
173 |   async execute() {
                        ^
error: SQLite query expected 2895 values, received 133967
      at #run (bun:sqlite:184:103)
      at execute (/app/node_modules/drizzle-orm/sqlite-core/query-builders/insert.js:173:19)
      at then (/app/node_modules/drizzle-orm/query-promise.js:21:17)

Consistently (at least 4 times now), the error triggers immediately after fetching page 53, where I assume it tries to iterate through the downloaded list of starred repos. Based on the timing of the error, I can tell this is some kind of internal issue. Each GitHub response takes ~2.5s, but the error triggers immediately after page 53 has been downloaded, which I strongly believe is the final page anyway. So not a networking issue, and not a rate limit (I can immediately retry the operation and download all 53 pages again).

I wish I could provide more context, but to my knowledge I have a pretty standard setup here.

Let me know if I can provide anything else, and thanks for your help!

<!-- gh-comment-id:3288646732 --> @Jefferderp commented on GitHub (Sep 13, 2025): @arunavo4 This is a fresh setup of gitea-mirror. I click "Import GitHub Data" for the first time, and the scan consistently runs until page 53, where it ends with the above error. I assume page 53 is the final page, no error there. The error is thrown immediately afterwards. GitHub says I have "5,000+" stars (wow!). Given that each request is for 100 repos, and there are 53 pages fetched, that comes out to ~5,300 repos. Seems like a match to me. My docker-compose.yml is completely stock - all settings changed via the GUI. Screenshot: <img width="2279" height="1101" alt="Image" src="https://github.com/user-attachments/assets/127c8b82-a26c-487c-a229-c9f1df853bad" /> The "Test Connection" buttons for GitHub and Gitea both return a "Successfully connected" message. No issues there. I've added a few more starred repos in the past day, and the error message has changed a bit: ``` GET /user/starred?per_page=100&page=51 - 200 with id A556:1C22A5:5C5219:14DEFC8:68C5A413 in 3013ms GET /user/starred?per_page=100&page=52 - 200 with id A556:1C22A5:5C5BE9:14E1303:68C5A416 in 2417ms GET /user/starred?per_page=100&page=53 - 200 with id A556:1C22A5:5C6343:14E2DD2:68C5A419 in 1980ms Error in GitHub data sync: 168 | return this._prepare().get(placeholderValues); 169 | }; 170 | values = (placeholderValues) => { 171 | return this._prepare().values(placeholderValues); 172 | }; 173 | async execute() { ^ error: SQLite query expected 2895 values, received 133967 at #run (bun:sqlite:184:103) at execute (/app/node_modules/drizzle-orm/sqlite-core/query-builders/insert.js:173:19) at then (/app/node_modules/drizzle-orm/query-promise.js:21:17) Error name: Error Error message: SQLite query expected 2895 values, received 133967 Error stack: Error: SQLite query expected 2895 values, received 133967 at run (unknown) at #run (bun:sqlite:184:103) at execute (/app/node_modules/drizzle-orm/sqlite-core/query-builders/insert.js:173:19) at then (/app/node_modules/drizzle-orm/query-promise.js:21:17) at processTicksAndRejections (native:7:39) [Scheduler] Found 5286 new repositories for user AOwkXKTgVGY9XIOI13d7lTUiG6ayOpfp [Scheduler] Checking for orphaned repositories to cleanup for user AOwkXKTgVGY9XIOI13d7lTUiG6ayOpfp... [Scheduler] Failed to auto-import repositories for user AOwkXKTgVGY9XIOI13d7lTUiG6ayOpfp: 168 | return this._prepare().get(placeholderValues); 169 | }; 170 | values = (placeholderValues) => { 171 | return this._prepare().values(placeholderValues); 172 | }; 173 | async execute() { ^ error: SQLite query expected 2895 values, received 133967 at #run (bun:sqlite:184:103) at execute (/app/node_modules/drizzle-orm/sqlite-core/query-builders/insert.js:173:19) at then (/app/node_modules/drizzle-orm/query-promise.js:21:17) ``` Consistently (at least 4 times now), the error triggers immediately after fetching page 53, where I assume it tries to iterate through the downloaded list of starred repos. Based on the *timing* of the error, I can tell this is some kind of internal issue. Each GitHub response takes ~2.5s, but the error triggers *immediately* after page 53 has been downloaded, which I strongly believe is the final page *anyway*. So not a networking issue, and not a rate limit (I can immediately retry the operation and download all 53 pages again). I wish I could provide more context, but to my knowledge I have a pretty standard setup here. Let me know if I can provide anything else, and thanks for your help!
Author
Owner

@Jefferderp commented on GitHub (Sep 13, 2025):

In case it's helpful, I restarted the Docker container, and the following happened automatically on boot:

Starting automatic mirror scheduler service...
[Scheduler] Starting scheduler service
Starting repository cleanup service...
[Repository Cleanup] Starting repository cleanup service
[Repository Cleanup] Service started, checking every 6 hours
[Scheduler] Auto-start conditions met for user AOwkXKTgVGY9XIOI13d7lTUiG6ayOpfp (scheduleEnabled=true, hasMirrorInterval=true)
[Repository Cleanup] Processing 1 configurations
[Repository Cleanup] Warning: CLEANUP_DELETE_FROM_GITEA is false but CLEANUP_DELETE_IF_NOT_IN_GITHUB is true. Proceeding with cleanup.
[Repository Cleanup] Starting repository cleanup for user AOwkXKTgVGY9XIOI13d7lTUiG6ayOpfp
[Scheduler] Auto-start detected from environment variables, triggering initial import and mirror...
[Scheduler] Performing initial auto-start...
[Scheduler] Auto-starting for user AOwkXKTgVGY9XIOI13d7lTUiG6ayOpfp...
[Scheduler] Step 1: Importing repositories from GitHub for user AOwkXKTgVGY9XIOI13d7lTUiG6ayOpfp...
GET /user/repos?per_page=100 - 200 with id 8134:12D9F6:1AC52E2:60EE97B:68C5A57B in 318ms
GET /user/starred?per_page=100 - 200 with id 8136:D7E2C:1C0535C:660C868:68C5A57B in 2804ms
GET /user/starred?per_page=100&page=2 - 200 with id 8120:1DDB88:1C5A02C:6749618:68C5A57C in 1886ms
GET /user/starred?per_page=100&page=3 - 200 with id 8120:1DDB88:1C5A6B4:674AD7A:68C5A580 in 3039ms
GET /user/starred?per_page=100&page=4 - 200 with id 8120:1DDB88:1C5B152:674D3BA:68C5A583 in 2601ms
GET /user/starred?per_page=100&page=5 - 200 with id 8120:1DDB88:1C5B9E9:674F2B0:68C5A586 in 2772ms
...truncated...
GET /user/starred?per_page=100&page=47 - 200 with id 8120:1DDB88:1C74DD7:67A9BDD:68C5A5F9 in 2466ms
GET /user/starred?per_page=100&page=48 - 200 with id 8120:1DDB88:1C75754:67ABDC0:68C5A5FB in 2406ms
GET /user/starred?per_page=100&page=49 - 200 with id 8120:1DDB88:1C76012:67ADD85:68C5A5FE in 9317ms
[Scheduler] Importing 5286 repositories for user AOwkXKTgVGY9XIOI13d7lTUiG6ayOpfp...
[Scheduler] Failed to auto-start for user AOwkXKTgVGY9XIOI13d7lTUiG6ayOpfp: 168 |     return this._prepare().get(placeholderValues);
169 |   };
170 |   values = (placeholderValues) => {
171 |     return this._prepare().values(placeholderValues);
172 |   };
173 |   async execute() {
                        ^
error: SQLite query expected 2895 values, received 133967
      at #run (bun:sqlite:184:103)
      at execute (/app/node_modules/drizzle-orm/sqlite-core/query-builders/insert.js:173:19)
      at then (/app/node_modules/drizzle-orm/query-promise.js:21:17)

[Scheduler] Initial auto-start completed
[Scheduler] Scheduler service started, checking every 1m for scheduled tasks
[Scheduler] To trigger manual sync, check your configuration intervals and ensure SCHEDULE_ENABLED=true or use GITEA_MIRROR_INTERVAL
[Scheduler] Processing 1 valid configurations (out of 1 with scheduling enabled)
[Scheduler] Skipping user AOwkXKTgVGY9XIOI13d7lTUiG6ayOpfp - next run at 2025-09-20T17:07:10.652Z
GET /user/starred?per_page=100&page=50 - 200 with id 8120:1DDB88:1C78000:67B51A9:68C5A607 in 3070ms
GET /user/starred?per_page=100&page=51 - 200 with id 8130:3E26BA:1BB69AC:63FEF8C:68C5A60A in 2963ms
GET /user/starred?per_page=100&page=52 - 200 with id 8130:3E26BA:1BB734E:64012C0:68C5A60D in 2597ms
GET /user/starred?per_page=100&page=53 - 200 with id 8130:3E26BA:1BB7BC7:6403121:68C5A610 in 2370ms
[Repository Cleanup] No orphaned repositories found for user AOwkXKTgVGY9XIOI13d7lTUiG6ayOpfp
[Scheduler] Processing 1 valid configurations (out of 1 with scheduling enabled)
[Scheduler] Skipping user AOwkXKTgVGY9XIOI13d7lTUiG6ayOpfp - next run at 2025-09-20T17:07:10.652Z
<!-- gh-comment-id:3288649309 --> @Jefferderp commented on GitHub (Sep 13, 2025): In case it's helpful, I restarted the Docker container, and the following happened automatically on boot: ``` Starting automatic mirror scheduler service... [Scheduler] Starting scheduler service Starting repository cleanup service... [Repository Cleanup] Starting repository cleanup service [Repository Cleanup] Service started, checking every 6 hours [Scheduler] Auto-start conditions met for user AOwkXKTgVGY9XIOI13d7lTUiG6ayOpfp (scheduleEnabled=true, hasMirrorInterval=true) [Repository Cleanup] Processing 1 configurations [Repository Cleanup] Warning: CLEANUP_DELETE_FROM_GITEA is false but CLEANUP_DELETE_IF_NOT_IN_GITHUB is true. Proceeding with cleanup. [Repository Cleanup] Starting repository cleanup for user AOwkXKTgVGY9XIOI13d7lTUiG6ayOpfp [Scheduler] Auto-start detected from environment variables, triggering initial import and mirror... [Scheduler] Performing initial auto-start... [Scheduler] Auto-starting for user AOwkXKTgVGY9XIOI13d7lTUiG6ayOpfp... [Scheduler] Step 1: Importing repositories from GitHub for user AOwkXKTgVGY9XIOI13d7lTUiG6ayOpfp... GET /user/repos?per_page=100 - 200 with id 8134:12D9F6:1AC52E2:60EE97B:68C5A57B in 318ms GET /user/starred?per_page=100 - 200 with id 8136:D7E2C:1C0535C:660C868:68C5A57B in 2804ms GET /user/starred?per_page=100&page=2 - 200 with id 8120:1DDB88:1C5A02C:6749618:68C5A57C in 1886ms GET /user/starred?per_page=100&page=3 - 200 with id 8120:1DDB88:1C5A6B4:674AD7A:68C5A580 in 3039ms GET /user/starred?per_page=100&page=4 - 200 with id 8120:1DDB88:1C5B152:674D3BA:68C5A583 in 2601ms GET /user/starred?per_page=100&page=5 - 200 with id 8120:1DDB88:1C5B9E9:674F2B0:68C5A586 in 2772ms ...truncated... GET /user/starred?per_page=100&page=47 - 200 with id 8120:1DDB88:1C74DD7:67A9BDD:68C5A5F9 in 2466ms GET /user/starred?per_page=100&page=48 - 200 with id 8120:1DDB88:1C75754:67ABDC0:68C5A5FB in 2406ms GET /user/starred?per_page=100&page=49 - 200 with id 8120:1DDB88:1C76012:67ADD85:68C5A5FE in 9317ms [Scheduler] Importing 5286 repositories for user AOwkXKTgVGY9XIOI13d7lTUiG6ayOpfp... [Scheduler] Failed to auto-start for user AOwkXKTgVGY9XIOI13d7lTUiG6ayOpfp: 168 | return this._prepare().get(placeholderValues); 169 | }; 170 | values = (placeholderValues) => { 171 | return this._prepare().values(placeholderValues); 172 | }; 173 | async execute() { ^ error: SQLite query expected 2895 values, received 133967 at #run (bun:sqlite:184:103) at execute (/app/node_modules/drizzle-orm/sqlite-core/query-builders/insert.js:173:19) at then (/app/node_modules/drizzle-orm/query-promise.js:21:17) [Scheduler] Initial auto-start completed [Scheduler] Scheduler service started, checking every 1m for scheduled tasks [Scheduler] To trigger manual sync, check your configuration intervals and ensure SCHEDULE_ENABLED=true or use GITEA_MIRROR_INTERVAL [Scheduler] Processing 1 valid configurations (out of 1 with scheduling enabled) [Scheduler] Skipping user AOwkXKTgVGY9XIOI13d7lTUiG6ayOpfp - next run at 2025-09-20T17:07:10.652Z GET /user/starred?per_page=100&page=50 - 200 with id 8120:1DDB88:1C78000:67B51A9:68C5A607 in 3070ms GET /user/starred?per_page=100&page=51 - 200 with id 8130:3E26BA:1BB69AC:63FEF8C:68C5A60A in 2963ms GET /user/starred?per_page=100&page=52 - 200 with id 8130:3E26BA:1BB734E:64012C0:68C5A60D in 2597ms GET /user/starred?per_page=100&page=53 - 200 with id 8130:3E26BA:1BB7BC7:6403121:68C5A610 in 2370ms [Repository Cleanup] No orphaned repositories found for user AOwkXKTgVGY9XIOI13d7lTUiG6ayOpfp [Scheduler] Processing 1 valid configurations (out of 1 with scheduling enabled) [Scheduler] Skipping user AOwkXKTgVGY9XIOI13d7lTUiG6ayOpfp - next run at 2025-09-20T17:07:10.652Z ```
Author
Owner

@arunavo4 commented on GitHub (Sep 13, 2025):

@Jefferderp thanks for the detailed info. So the github signed in api request is rated at 5000 requests/hr and tho I have implemented the rate limit. since i dont have that many repos it seems at my end it never fails and this failure is happening when there is a high number of repos.
will add more logs and see how this can be fixed.

<!-- gh-comment-id:3288651054 --> @arunavo4 commented on GitHub (Sep 13, 2025): @Jefferderp thanks for the detailed info. So the github signed in api request is rated at 5000 requests/hr and tho I have implemented the rate limit. since i dont have that many repos it seems at my end it never fails and this failure is happening when there is a high number of repos. will add more logs and see how this can be fixed.
Author
Owner

@arunavo4 commented on GitHub (Sep 13, 2025):

@Jefferderp after checking looks like due to high number of repos was exceeding the 999 parameter limit of sqlite db so I have added batch inserts to the sqlite db now that should solve the issue. Can you test out the v3.7.0

<!-- gh-comment-id:3288728470 --> @arunavo4 commented on GitHub (Sep 13, 2025): @Jefferderp after checking looks like due to high number of repos was exceeding the 999 parameter limit of sqlite db so I have added batch inserts to the sqlite db now that should solve the issue. Can you test out the `v3.7.0`
Author
Owner

@Jefferderp commented on GitHub (Sep 13, 2025):

@arunavo4 That worked! Repos are mirroring now. Thank you so much :)

<!-- gh-comment-id:3288750719 --> @Jefferderp commented on GitHub (Sep 13, 2025): @arunavo4 That worked! Repos are mirroring now. Thank you so much :)
Author
Owner

@arunavo4 commented on GitHub (Sep 14, 2025):

@Jefferderp Awesome

@sunny-g I think your problem should then also be solved now.
I will close this issue if you still have issues then feel free to reopen this.

<!-- gh-comment-id:3289082578 --> @arunavo4 commented on GitHub (Sep 14, 2025): @Jefferderp Awesome @sunny-g I think your problem should then also be solved now. I will close this issue if you still have issues then feel free to reopen this.
Author
Owner

@sunny-g commented on GitHub (Sep 14, 2025):

@arunavo4 seems good to go, thank you!

<!-- gh-comment-id:3290023800 --> @sunny-g commented on GitHub (Sep 14, 2025): @arunavo4 seems good to go, thank you!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/gitea-mirror#47
No description provided.