500 Internal Server Error due to weird specific corruption error #3852

Closed
opened 2025-11-02 05:28:22 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @theAkito on GitHub (Aug 26, 2019).

  • Gitea version (or commit ref): any
  • Git version: any
  • Operating system: any
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:
handleCreateError() [E] CreatePost: newRepoAction: notify watchers '1/71': insert new actioner: pq: could not read block 12288 in file "base/16385/16944": read only 0 of 8192 bytes

Description

Happens on git push, creating repository and anything that tries to write anything onto the disk. Yes, it seems like a file-system error, but how do I fix this error in Gitea? How can I tell Gitea to ignore this file and go on with their life? git push throws this error, every time but the push works. Problem now is, that the error does not let me create a new repository. All existing repositories work fine. I just want to get rid of this error.

Originally created by @theAkito on GitHub (Aug 26, 2019). <!-- NOTE: If your issue is a security concern, please send an email to security@gitea.io instead of opening a public issue --> <!-- 1. Please speak English, this is the language all maintainers can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/gitea) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): any - Git version: any - Operating system: any - Database (use `[x]`): - [x] PostgreSQL - [ ] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x] Not relevant - Log gist: ``` handleCreateError() [E] CreatePost: newRepoAction: notify watchers '1/71': insert new actioner: pq: could not read block 12288 in file "base/16385/16944": read only 0 of 8192 bytes ``` ## Description Happens on `git push`, creating repository and anything that tries to write anything onto the disk. Yes, it seems like a file-system error, but how do I fix this error in Gitea? How can I tell Gitea to ignore this file and go on with their life? `git push` throws this error, every time **but the push works**. Problem now is, that the error does not let me create a new repository. All existing repositories work fine. I just want to get rid of this error.
Author
Owner

@guillep2k commented on GitHub (Aug 26, 2019):

This error is happening in your database. The functions that throw that error don't interact with the file system directly. Besides, "pq:" stands for PostgreSQL. 😉

@guillep2k commented on GitHub (Aug 26, 2019): This error is happening in your database. The functions that throw that error don't interact with the file system directly. Besides, "pq:" stands for PostgreSQL. 😉
Author
Owner

@theAkito commented on GitHub (Aug 26, 2019):

This error is happening in your database. The functions that throw that error don't interact with the file system directly. Besides, "pq:" stands for PostgreSQL. 😉

Good to know. Can it be caused by a recent update to PostgreSQL?

@theAkito commented on GitHub (Aug 26, 2019): > > > This error is happening in your database. The functions that throw that error don't interact with the file system directly. Besides, "pq:" stands for PostgreSQL. 😉 Good to know. Can it be caused by a recent update to PostgreSQL?
Author
Owner

@theAkito commented on GitHub (Aug 26, 2019):

Fixed by running:

$ sudo -u yourdbuser psql
=> \c yourdbname
=> reindex database "yourdbname";
@theAkito commented on GitHub (Aug 26, 2019): Fixed by running: ``` $ sudo -u yourdbuser psql => \c yourdbname => reindex database "yourdbname"; ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#3852