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

PetScan often gives no result (issue II) #148

Open
JotaCartas opened this issue Dec 25, 2023 · 14 comments
Open

PetScan often gives no result (issue II) #148

JotaCartas opened this issue Dec 25, 2023 · 14 comments

Comments

@JotaCartas
Copy link

JotaCartas commented Dec 25, 2023

Still appends - an Intermittent "No result for source categories" but no inclusion of "®exp_filter" on an random field.
image
PetScan gives this error during about 5 minutes, then it works again for a few minutes, then it gives the same error again in any simple query
See also #144"

@the-it
Copy link

the-it commented Dec 25, 2023

I see similar effects. I run a bot, which uses PetScan with the API interface. Since some time now I see often errors. The request returns with 200, but doesn't contain any results.

@JotaCartas
Copy link
Author

JotaCartas commented Dec 25, 2023

Schedule of occurrences: maybe it helps (Time zone info for Lisboa. UTC +0. Western European Time (WET)
2023/12/25 - 08:37 circa - Error
2023/12/25 - 08:45:04 - Running again OK
2023/12/25 - 08:49:10 - Error
2023/12/25 - 09:00:14 - Running again OK
2023/12/25 - 09:50 circa- Error
2023/12/25 - 10:02 circa - Running again OK
2023/12/25 - 10:05:07 - Error
2023/12/25 - 10:14 circa - Running again OK
2023/12/25 - 11:30 circa - Error

@kaubu
Copy link

kaubu commented Dec 25, 2023

Is happening to me right now, too. It was working fine for 10 minutes or so, then just suddenly stopped working.

Edit: Not sure what happened, but I wait like 10 minutes and it worked, which is actually in line with OP's post. It seems the service intermittently stops working.

@maximmasiutin
Copy link

I had this error too very often.

@ArztKlein
Copy link

I have the same problem. It works for 5 minutes, stops, then works again with the exact same queries.

@maximmasiutin
Copy link

Did somebody manage to install petscan on another instance, i.e. on own server machine? I tried, it worked, but always returned this error. I did not know how to debug this error, for example, how to enable full logging of URL requests and replies.

Do you know how to enable request logging?

Do you know how to properly install petscan on own server? There was no even database schema published, so I had to guess columns.

@maximmasiutin
Copy link

@magnusmanske - can you please help in writing small step-by-step instructions on how to install petscan on own server, so we could see what happens? I installed it, but it gives this error (no result for source categories) always, whereas the petscan from https://petscan.wmflabs.org/ gives this error from time to time.

@1-Byte
Copy link
Contributor

1-Byte commented Jan 5, 2024

@maximmasiutin
The following steps might help you to setup a local environment:

Setup local MySQL database on port 3308

CREATE TABLE `query` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `querystring` longtext DEFAULT NULL,
  `created` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`)
);

CREATE TABLE `started_queries` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `querystring` longtext DEFAULT NULL,
  `created` varchar(100) DEFAULT NULL,
  `process_id` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`)
);

Create config.json

{
  "host": "127.0.0.1",
  "user": "<localuser>",
  "password": "<localpassword>",
  "schema": "petscan",
  "http_port": 8000,
  "timeout": 30000,
  "restart-code": "",
  "mysql": [
    [
      "<u1111>",
      "<replicapassword>"
    ]
  ]
}

Forward replicas

ssh toolforge -L 3306:XXX.analytics.db.svc.wikimedia.cloud:3306 -L 3309:wikidatawiki.analytics.db.svc.wikimedia.cloud:3306

XXX: wiki to be queried (e.g. commonswiki)

Start server

cargo run

@Kintsugi3
Copy link

Is anyone working on this problem? Because Petscan is otherwise no longer usable.

@magnusmanske
Copy link
Owner

I have a lot of things on my plate but I am switching my attention to PetScan for now. Expect some fiddling and possible temporary breakage. Can someone please confirm the "®exp_filter" thing is still happening, because I tried to get rid of that recently.

@maximmasiutin
Copy link

Thank you! I used the latest version of petscan_rs sources from the repository, and now I'm getting proper error messages, such as:

2024-01-24T08:51:56.772295Z ERROR run:get_wiki_db_connection{wiki="enwiki"}: petscan_rs::app_state: error=Io(Io(Custom { kind: Uncategorized, error: "failed to lookup address information: Name or service not known" }))
2024-01-24T08:51:56.772437Z  INFO run: petscan_rs::platform: error=Io(Io(Custom { kind: Uncategorized, error: "failed to lookup address information: Name or service not known" }))
Platform::get_response: No result

I get this when I run from command line as you suggested:

cargo run -- "language=en&project=wikipedia&dept...

Anyway, now it properly displays error messages, thank you very much for the information that you provided in the README file on how to run it from the command line!

I didn't yet configured the wmflabs account, as you mentioned in the README, so this is probably the cause of the error message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants