toddrob99 / searcharr

Sonarr & Radarr & Readarr Telegram Bot
MIT License
249 stars 61 forks source link

Searcharr unable to find certain movies, no error or failed search message returned #12

Closed gabeclarke closed 3 years ago

gabeclarke commented 3 years ago

Love Searcharr, this is the first issue I've had. Not sure how reproducible this is. When searching certain titles, I never receive any sort of message, error or success. I know the bot is working because I can immediately search again for any other movie and it works.

The search terms I could consistently hit this with were : /movie muppets /movie Muppet Treasure Island /movie The Triplets of Belleville

I was able to circumvent this issue by searching via tmdb as mentioned in a previous issue.

This seems bizarrely specific and I've searched quite a few other movies with no issue. Could anyone else try these search terms and see the results?

toddrob99 commented 3 years ago

@DeftlyMoving, I tried all 3 of the examples and received results without issue. Have you enabled debug logging for Searcharr, and are you seeing anything in the logs? What version of Radarr are you using? How are you running Searcharr (docker, from source)?

gabeclarke commented 3 years ago

Radarr version 0.2.0.1504 Searcharr is being run via docker.

One example of the error, exact same issue occurs anytime I use the same phrase "Muppet Treasure Island".

2020-12-16 15:10:19,854 - DEBUG - searcharr(140391145294624):849 - Executing query: [INSERT OR REPLACE INTO conversations (id, username, type, results) VALUES (?, ?, ?, ?)] with args: [('TELEGRAMID', 'AdminUser', 'movie', '[{"title": "Muppet Treasure Island", "overview": "After telling the story of Flint\'s last journey to young Jim Hawkins, Billy Bones has a heart attack and dies just as Jim and his friends are attacked by pirates. The gang escapes into the town where they hire out a boat and crew to find the hidden treasure, which was revealed by Bones before he died. On their voyage across the seas, they soon find out that not everyone on board can be trusted.", "status": "released", "inCinemas": "1996-02-16T00:00:00Z", "remotePoster": "http://image.tmdb.org/t/p/original/8UL6EcZGO1ssD60azzOtUPjnOZI.jpg", "year": 1996, "tmdbId": 10874, "imdbId": null, "runtime": 0, "id": null, "titleSlug": "muppet-treasure-island-10874", "images": [{"coverType": "poster", "url": "http://image.tmdb.org/t/p/original/8UL6EcZGO1ssD60azzOtUPjnOZI.jpg"}]}, {"title": "Muppet Sing Alongs: Muppet Treasure Island", "overview": "Muppet Sing Alongs: Muppet Treasure Island is a 1996 video produced just before the release of the feature film Muppet Treasure Island. Kermit is joined by Polly Lobster, Clueless Morgan, Mad Monty and the other pirates from Muppet Treasure Island in this half hour of pirate songs.", "status": "released", "inCinemas": "1996-02-14T00:00:00Z", "remotePoster": "http://image.tmdb.org/t/p/original/ifGLSfxgl08jXFItoxZgviC1QXi.jpg", "year": 1996, "tmdbId": 698609, "imdbId": null, "runtime": 0, "id": null, "titleSlug": "muppet-sing-alongs-muppet-treasure-island-698609", "images": [{"coverType": "poster", "url": "http://image.tmdb.org/t/p/original/ifGLSfxgl08jXFItoxZgviC1QXi.jpg"}]}]')]

2020-12-16 15:10:40,952 - ERROR - searcharr(140391145294624):787 - Caught error: Timed out

Below is the example I get when searching just the generic "Muppet" term.

2020-12-16 15:09:58,161 - DEBUG - searcharr(140391145294624):849 - Executing query: [INSERT OR REPLACE INTO conversations (id, username, type, results) VALUES (?, ?, ?, ?)] with args: [('TELEGRAMID', 'AdminUser', 'movie', '[{"title": "Muppet Treasure Island", "overview": "After telling the story of Flint\'s last journey to young Jim Hawkins, Billy Bones has a heart attack and dies just as Jim and his friends are attacked by pirates. The gang escapes into the town where they hire out a boat and crew to find the hidden treasure, which was revealed by Bones before he died. On their voyage across the seas, they soon find out that not everyone on board can be trusted.", "status": "released", "inCinemas": "1996-02-16T00:00:00Z", "remotePoster": "http://image.tmdb.org/t/p/original/8UL6EcZGO1ssD60azzOtUPjnOZI.jpg", "year": 1996, "tmdbId": 10874, "imdbId": null, "runtime": 0, "id": null, "titleSlug": "muppet-treasure-island-10874", "images": [{"coverType": "poster", "url": "http://image.tmdb.org/t/p/original/8UL6EcZGO1ssD60azzOtUPjnOZI.jpg"}]}, {"title": "The Muppet Christmas Carol", "overview": "A retelling of the classic Dickens tale of Ebenezer Scrooge, miser extraordinaire. He is held accountable for his dastardly ways during night-time visitations by the Ghosts of Christmas Past, Present, and future.", "status": "released", "inCinemas": "1992-12-10T06:00:00Z", "remotePoster": "http://image.tmdb.org/t/p/original/by3MSAOvy6O80SJU6BnbSSyv4v.jpg", "year": 1992, "tmdbId": 10437, "imdbId": "tt0104940", "runtime": 85, "id": 334, "titleSlug": "the-muppet-christmas-carol-10437", "images": [{"coverType": "poster", "url": "http://image.tmdb.org/t/p/original/by3MSAOvy6O80SJU6BnbSSyv4v.jpg"}, {"coverType": "fanart", "url": "http://image.tmdb.org/t/p/original/fJQO9YzdufR8QbEOD1sWIHcgyKA.jpg"}]}, {"title": "The Muppet Movie", "overview": "A Hollywood agent persuades Kermit the Frog to pursue a career in Hollywood. On his way there he meets his future muppet crew while being chased by the desperate owner of a frog-leg restaurant!", "status": "released", "inCinemas": "1979-05-31T00:00:00Z", "remotePoster": "http://image.tmdb.org/t/p/original/g4xw8UUdpvmMg0kKbhD1dJvHqDH.jpg", "year": 1979, "tmdbId": 11176, "imdbId": null, "runtime": 0, "id": null, "titleSlug": "the-muppet-movie-11176", "images": [{"coverType": "poster", "url": "http://image.tmdb.org/t/p/original/g4xw8UUdpvmMg0kKbhD1dJvHqDH.jpg"}]}, {"title": "The Great Muppet Caper", "overview": "Kermit and Fozzie are newspaper reporters sent to London to interview Lady Holiday, a wealthy fashion designer whose priceless diamond necklace is stolen. Kermit meets and falls in love with her secretary, Miss Piggy. The jewel thieves strike again, and this time frame Miss Piggy. It\'s up to Kermit and Muppets to bring the real culprits to justice.", "status": "released", "inCinemas": "1981-06-26T00:00:00Z", "remotePoster": "http://image.tmdb.org/t/p/original/8ptvADD8FdEjtKj0by1Y1T1Agrb.jpg", "year": 1981, "tmdbId": 14900, "imdbId": null, "runtime": 0, "id": null, "titleSlug": "the-great-muppet-caper-14900", "images": [{"coverType": "poster", "url": "http://image.tmdb.org/t/p/original/8ptvADD8FdEjtKj0by1Y1T1Agrb.jpg"}]}, {"title": "A Muppet Family Christmas", "overview": "In this one-hour Christmas special, Fozzie Bear surprises his mother Emily on Christmas Eve by bringing the entire Muppet gang to her farm to celebrate the holidays. Doc and his dog Sprocket, who had planned a quiet Christmas, end up joining the Muppets in their holiday activities and preparations.The Sesame Street regulars, including Big Bird, Bert, Ernie and others, join the festivities, but to Kermit\'s dismay, the only one missing is Miss Piggy, who has been caught in a snowstorm.", "status": "released", "inCinemas": "1987-12-16T00:00:00Z", "remotePoster": "http://image.tmdb.org/t/p/original/4A5EaZptr1cgWD1BlqqUJhkFCPh.jpg", "year": 1987, "tmdbId": 13247, "imdbId": null, "runtime": 0, "id": null, "titleSlug": "a-muppet-family-christmas-13247", "images": [{"coverType": "poster", "url": "http://image.tmdb.org/t/p/original/4A5EaZptr1cgWD1BlqqUJhkFCPh.jpg"}]}, {"title": "It\'s a Very Merry Muppet Christmas Movie", "overview": "The owner of a bank (Miss Bitterman) wants to own the Muppet Theatre so she can build a nightclub over it. After she tricks Pepe into giving her the only copy of the contract between her father and the Muppets, she changes it so the Muppets have very little time to pay a debt they owe. Meanwhile, the Muppets are trying to put on a Christmas show. After the Muppets are confronted by Bitterman, they make a lot of sacrifices to save up so they can keep the Theatre.", "status": "released", "inCinemas": "2002-11-29T00:00:00Z", "remotePoster": "http://image.tmdb.org/t/p/original/AwCKDQ4GEJIAEDuZOx8tnX2iIiD.jpg", "year": 2002, "tmdbId": 13352, "imdbId": null, "runtime": 0, "id": null, "titleSlug": "its-a-very-merry-muppet-christmas-movie-13352", "images": [{"coverType": "poster", "url": "http://image.tmdb.org/t/p/original/AwCKDQ4GEJIAEDuZOx8tnX2iIiD.jpg"}]}, {"title": "Muppet Classic Theater", "overview": "Gonzo and Rizzo host a presentation in the Muppet Theater of six fairy tales performed by the Muppets. Kermit the Frog, Miss Piggy, Fozzie Bear, Robin the Frog, Gonzo and Rizzo star in the various stories. The production also marked the first appearance of Andy and Randy Pig and the Elvises, who later appeared on Muppets Tonight. Written by Jim Lewis and Bill Prady, each story also features an original song.", "status": "released", "inCinemas": "1994-09-27T00:00:00Z", "remotePoster": "https://artworks.thetvdb.com/banners/images/missing/movie.jpg", "year": 1994, "tmdbId": 115994, "imdbId": null, "runtime": 0, "id": null, "titleSlug": "muppet-classic-theater-115994", "images": []}, {"title": "MuppetVision 3-D", "overview": "Muppetvision 3-D, more appropriately, 4-D, can only be seen at the Disney\'s Hollywood Studios in Walt Disney World, Orlando, FL and also at California Adventure at the Disneyland Resort, Anaheim, CA.", "status": "released", "inCinemas": "1991-05-16T00:00:00Z", "remotePoster": "https://artworks.thetvdb.com/banners/images/missing/movie.jpg", "year": 1991, "tmdbId": 116658, "imdbId": null, "runtime": 0, "id": null, "titleSlug": "muppetvision-3-d-116658", "images": []}, {"title": "Muppet Music Moments", "overview": "Music was always an integral part of The Muppet Show, and assembled here is a collection of some of the classic music numbers interpreted as only the Muppets can. This compilation features a wide range of musical genres, including performances by guest stars Harry Belafonte, Elton John, and Linda Ronstadt.", "status": "released", "inCinemas": "2004-11-20T00:00:00Z", "remotePoster": "https://artworks.thetvdb.com/banners/images/missing/movie.jpg", "year": 2004, "tmdbId": 343246, "imdbId": null, "runtime": 0, "id": null, "titleSlug": "muppet-music-moments-343246", "images": []}, {"title": "Of Muppets & Men: The Making of the Muppet Show", "overview": "Documentary about the work of puppeteer Jim Henson and his team in creating The Muppet Show.", "status": "released", "inCinemas": "1981-01-01T00:00:00Z", "remotePoster": "http://image.tmdb.org/t/p/original/xEaz3kXfbGr68BNFuI3PZt3gp7B.jpg", "year": 1981, "tmdbId": 63252, "imdbId": null, "runtime": 0, "id": null, "titleSlug": "of-muppets-men-the-making-of-the-muppet-show-63252", "images": [{"coverType": "poster", "url": "http://image.tmdb.org/t/p/original/xEaz3kXfbGr68BNFuI3PZt3gp7B.jpg"}]}, {"title": "Best of the Muppet Show", "overview": "4 pack DVD of the Best of the Muppet Show", "status": "released", "inCinemas": "2002-09-03T00:00:00Z", "remotePoster": "http://image.tmdb.org/t/p/original/5jz77jagkV8Rz3N03GJNWgFGFA5.jpg", "year": 2002, "tmdbId": 297673, "imdbId": null, "runtime": 0, "id": null, "titleSlug": "best-of-the-muppet-show-297673", "images": [{"coverType": "poster", "url": "http://image.tmdb.org/t/p/original/5jz77jagkV8Rz3N03GJNWgFGFA5.jpg"}]}, {"title": "Muppet Guys Talking: Secrets Behind the Show the Whole World Watched", "overview": "Five of the original Muppet performers come together for the first time ever to share behind-the-scenes secrets of the Muppets. Includes rare performance footage, surprising stories and insights into how Jim led his team to produce legendary work.", "status": "released", "inCinemas": "2017-03-12T00:00:00Z", "remotePoster": "http://image.tmdb.org/t/p/original/l7N2uLx5iguWy0A6uPQiEyQdBB4.jpg", "year": 2017, "tmdbId": 438475, "imdbId": null, "runtime": 0, "id": null, "titleSlug": "muppet-guys-talking-secrets-behind-the-show-the-whole-world-watched-438475", "images": [{"coverType": "poster", "url": "http://image.tmdb.org/t/p/original/l7N2uLx5iguWy0A6uPQiEyQdBB4.jpg"}]}, {"title": "Muppet Sing Alongs: Muppet Treasure Island", "overview": "Muppet Sing Alongs: Muppet Treasure Island is a 1996 video produced just before the release of the feature film Muppet Treasure Island. Kermit is joined by Polly Lobster, Clueless Morgan, Mad Monty and the other pirates from Muppet Treasure Island in this half hour of pirate songs.", "status": "released", "inCinemas": "1996-02-14T00:00:00Z", "remotePoster": "http://image.tmdb.org/t/p/original/ifGLSfxgl08jXFItoxZgviC1QXi.jpg", "year": 1996, "tmdbId": 698609, "imdbId": null, "runtime": 0, "id": null, "titleSlug": "muppet-sing-alongs-muppet-treasure-island-698609", "images": [{"coverType": "poster", "url": "http://image.tmdb.org/t/p/original/ifGLSfxgl08jXFItoxZgviC1QXi.jpg"}]}, {"title": "Best Ever Muppet Moments", "overview": "A review of the most memorable Muppet moments to commemorate Kermit the Frog\'s 50th anniversary.", "status": "released", "inCinemas": "2006-03-11T00:00:00Z", "remotePoster": "http://image.tmdb.org/t/p/original/v0txyyMJ9bcWZpXKkDYjeBudhCK.jpg", "year": 2006, "tmdbId": 261760, "imdbId": null, "runtime": 0, "id": null, "titleSlug": "best-ever-muppet-moments-261760", "images": [{"coverType": "poster", "url": "http://image.tmdb.org/t/p/original/v0txyyMJ9bcWZpXKkDYjeBudhCK.jpg"}]}, {"title": "Muppet Picker Upper", "overview": "Consists of the shorts \"The Muppet Introduction\", \"Just a Few Announcements\" and \"Sell, Sell, Sell\".", "status": "released", "inCinemas": "1975-01-01T00:00:00Z", "remotePoster": "https://artworks.thetvdb.com/banners/images/missing/movie.jpg", "year": 1975, "tmdbId": 453746, "imdbId": null, "runtime": 0, "id": null, "titleSlug": "muppet-picker-upper-453746", "images": []}, {"title": "Muppet Treasures", "overview": "", "status": "released", "inCinemas": "1985-05-23T00:00:00Z", "remotePoster": "https://artworks.thetvdb.com/banners/images/missing/movie.jpg", "year": 1985, "tmdbId": 608530, "imdbId": null, "runtime": 0, "id": null, "titleSlug": "muppet-treasures-608530", "images": []}, {"title": "The Muppet Revue", "overview": "Kermit and Fozzie take a stroll down Muppet Memory Lane in this rollicking revue which contains both original production and material from the best of the Muppet Show series. Along the way, they share songs and laughs with Harry Belafonte, Rita Moreno, Linda Ronstadt and Paul Williams. Music spectaculars ranging from \"Moonlight Sonata\" to \"Stayin\' Alive\" are interspersed with Muppet News, breakthroughs (and crackups) from Muppet Labs, culinary creations from the Swedish Chef, and much, much more.", "status": "released", "inCinemas": "1985-01-01T00:00:00Z", "remotePoster": "http://image.tmdb.org/t/p/original/nZpgzM1eSco0VvEFXhFCFv5DeHU.jpg", "year": 1985, "tmdbId": 726728, "imdbId": null, "runtime": 0, "id": null, "titleSlug": "the-muppet-revue-726728", "images": [{"coverType": "poster", "url": "http://image.tmdb.org/t/p/original/nZpgzM1eSco0VvEFXhFCFv5DeHU.jpg"}]}, {"title": "Jim Henson\'s Muppet Babies: The Daily Muppet", "overview": "The nursery- Stop the presses and yell yippee-skippee!", "status": "released", "inCinemas": "1988-01-01T00:00:00Z", "remotePoster": "https://artworks.thetvdb.com/banners/images/missing/movie.jpg", "year": 1988, "tmdbId": 436093, "imdbId": null, "runtime": 0, "id": null, "titleSlug": "jim-hensons-muppet-babies-the-daily-muppet-436093", "images": []}, {"title": "The Muppet Musicians of Bremen", "overview": "Four mistreated farm animals seek refuge as a band of traveling musicians in this musical tale narrated by Kermit the Frog.", "status": "released", "inCinemas": "1972-01-01T00:00:00Z", "remotePoster": "http://image.tmdb.org/t/p/original/5NKAhVMbAmnYbmGgG17kemcgfvR.jpg", "year": 1972, "tmdbId": 51302, "imdbId": null, "runtime": 0, "id": null, "titleSlug": "the-muppet-musicians-of-bremen-51302", "images": [{"coverType": "poster", "url": "http://image.tmdb.org/t/p/original/5NKAhVMbAmnYbmGgG17kemcgfvR.jpg"}]}, {"title": "Muppet Video: Gonzo Presents Muppet Weird Stuff", "overview": "Gonzo hosts this collection of some of the weirdest moments from The Muppet Show at his trailer home, assisted by Camilia and visited by Kermit The Frog.", "status": "released", "inCinemas": "1985-08-08T00:00:00Z", "remotePoster": "https://artworks.thetvdb.com/banners/images/missing/movie.jpg", "year": 1985, "tmdbId": 653667, "imdbId": null, "runtime": 0, "id": null, "titleSlug": "muppet-video-gonzo-presents-muppet-weird-stuff-653667", "images": []}]')]

2020-12-16 15:10:18,389 - ERROR - searcharr(140391145294624):787 - Caught error: Timed out

In between these searches I was able to successfully search for and add other movies. I'll also mention I don't think this would be an issue with spamming my server too frequently, I would typically give it several minutes between requests and still see the issue.

toddrob99 commented 3 years ago

It looks like the database insert is timing out after 20 seconds. Can you add the -d flag to your docker command to enable developer mode (so now you'll have -dv), and reproduce the issue again? Developer mode will stop the exception from being caught. Then you should be able to find the exception including stack trace by running docker logs searcharr.

I'm guessing the exception will confirm my theory that it's the sqlite query timing out. Is there anything special about your setup, specifically how your data directory containing searcharr.db file is mapped?

It's strange that it would fail to insert for these movies but succeed for others. I don't see any pattern based on the lengths of the search results (the first one you posted is pretty short). Does your bot have a lot of concurrent activity by any chance?

gabeclarke commented 3 years ago

It doesn't have a lot of concurrent activity, only 2 people using it and at this time I confirmed they were not doing any searching. I appreciate the troubleshooting steps, I will take a look at those in the future. Oddly enough I can no longer reproduce the issue, the phrases I previously used are now retrieving the movies successfully.

I'm leaning towards chalking this one up to my server perhaps running into a lack of processing power/ram or something along those lines.

Thanks for your help!

toddrob99 commented 3 years ago

Sounds good. It is strange that it would only happen for some movies, but glad it’s not happening now. FYI, I pushed a new version last night—no change related to this but thought I’d mention it anyway. It adds support for tagging movies/series with searcharr-username so you can tell who added what. Settings need to be added to your settings.py, and setting names are in the sample settings file.