Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL error upon updating actor #6385

Open
kontrollanten opened this issue May 8, 2024 · 2 comments
Open

SQL error upon updating actor #6385

kontrollanten opened this issue May 8, 2024 · 2 comments
Labels
Status: Waiting for answer Waiting issue author answer

Comments

@kontrollanten
Copy link
Contributor

Describe the current behavior

We see a lot of the following errors in our postgres logs. Some times they come multiple times per our and some times it's some hours between.

2024-05-08 11:03:31.239 UTC [3800318] [10.1.0.193(42088)] peertube@peertube_prod ERROR:  duplicate key value violates unique constraint "actor_url"
2024-05-08 11:03:31.239 UTC [3800318] [10.1.0.193(42088)] peertube@peertube_prod DETAIL:  Key (url)=(https://REMOTE_INSTANCE/accounts/peertube) already exists.
2024-05-08 11:03:31.239 UTC [3800318] [10.1.0.193(42088)] peertube@peertube_prod STATEMENT:  UPDATE "actor" SET "type"=$1,"preferredUsername"=$2,"url"=$3,"publicKey"=$4,"followingCount"=$5,"inboxUrl"=$6,"outboxUrl"=$7,"followersUrl"=$8,"followingUrl"=$9,"remoteCreatedAt"=$10,"updatedAt"=$11 WHERE "id" = $12

The REMOTE_INSTANCE variable is a Peertube instance who's following ours, and that instance is running Peertube 6.0.4. Some of the errors is logged at the same timestamp as when activity-pub-refresher job has been ran (succesfully). These jobs has a payload that looks like:

{
  "type": "actor",
  "url": "https://REMOTE_INSTANCE/accounts/SOME_USERNAME"
}

Steps to reproduce

Describe the expected behavior

No response

Additional information

  • PeerTube instance:

    • URL:
    • Version: 6.1.0
    • NodeJS version:
    • Ffmpeg version:
  • Browser name, version and platforms on which you could reproduce the bug:

  • Link to browser console log if relevant:

  • Link to server log if relevant (journalctl or /var/www/peertube/storage/logs/):

@Chocobozzz
Copy link
Owner

Chocobozzz commented May 16, 2024

Hi,

Are you able to check in your database the current url of the row "id" = $12? I suspect the remote instance updated its URL, that you already have in your database.

@Chocobozzz Chocobozzz added the Status: Waiting for answer Waiting issue author answer label May 16, 2024
@kontrollanten
Copy link
Contributor Author

When I check the current url it's the same URL as the one it's trying to update with. I checked if there's any other rows with the same url, but it's just one. Sounds weird. I'm getting the id from this log statement

logger.info('Cannot refresh actor %s.', actor.url, { err, ...lTags() })

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Waiting for answer Waiting issue author answer
Projects
None yet
Development

No branches or pull requests

2 participants