tatoeba2 icon indicating copy to clipboard operation
tatoeba2 copied to clipboard

Internal error when using advanced search with no words

Open Poulpisator opened this issue 6 years ago • 5 comments

Steps to reproduce Do this search: Sentences in English having Japanese translations limited to having indirect Japanese translations. https://tatoeba.org/fra/sentences/search?query=&from=eng&to=jpn&user=&orphans=no&unapproved=no&has_audio=&tags=&list=&native=&trans_filter=limit&trans_to=jpn&trans_link=indirect&trans_user=&trans_orphan=&trans_unapproved=&trans_has_audio=&sort=relevance&sort_reverse=

Add a word and the search works well.

Poulpisator avatar Dec 17 '19 03:12 Poulpisator

Is this still an issue? I can't reproduce.

trang avatar Dec 28 '19 13:12 trang

I can't reproduce it either.

alanfgh avatar Dec 28 '19 18:12 alanfgh

Oh? But I can ^^ Simply clicking the link above gives me the "Internal Error occured" message.

[EDIT] It occurs only with my Firefox though... Let me investigate a little bit more and come back to you.

Poulpisator avatar Dec 29 '19 07:12 Poulpisator

I can reproduce the problem if I set the number of sentences per page to 100 but it works if I limit the number of sentences per page to 50.

So I think it's the same problem as described in #1737 and #2024 .

My theory for all these memory exhaustion issues: Whenever we want to display a page which includes many sentences with many translations (direct and indirect) then the underlying data structures in the memory will grow to big.

Some observations to backup that theory: -) Changing the sort parameter in the URL for this issue from relevance to e.g. created will show the page even with the number of sentences per page set to 100.

-) Reversing the relevance sort (adding reverse=yes to the URL) works.

-) Displaying the second page of the result (adding page=2 to the URL) works.

I've noticed that the issue is also present on dev so this should help for debugging. I would find it interesting to get the first 100 sentence ids for the result of this query.

AndiPersti avatar Dec 29 '19 11:12 AndiPersti

I occasionally get this error message with searches. It's not limited to searches with no words.

The solution for me is to lower my sentences per page to 50 temporarily when this happens.

ckjpn avatar Feb 20 '24 01:02 ckjpn