AUR web interface

Tasklist

FS#31849 - Bad variable in rpc.php

Attached to Project: AUR web interface
Opened by Arteom (arutemus) - Monday, 08 October 2012, 23:01 GMT
Last edited by Lukas Fleischer (lfleischer) - Sunday, 04 November 2012, 11:44 GMT
Task Type Bug Report
Category Backend
Status Closed
Assigned To canyonknight (canyonknight)
Architecture All
Severity High
Priority Normal
Reported Version 2.0.0-rc1
Due in Version 2.0.0
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

The web server return the error 500 when the variable "arg" in the rpc.php is "in" or "ing".

For example bad urls:
http://aur.archlinux.org/rpc.php?type=search&arg=in
http://aur.archlinux.org/rpc.php?type=search&arg=ing
This task depends upon

Closed by  Lukas Fleischer (lfleischer)
Sunday, 04 November 2012, 11:44 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in 2.0.0.
Comment by Arteom (arutemus) - Monday, 08 October 2012, 23:13 GMT
Also the same result is for "on", "in", "to", "for".
Comment by Lukas Fleischer (lfleischer) - Monday, 08 October 2012, 23:16 GMT
This happens if the response contains too many results. Relevant log entry:

----
Oct 8 19:11:38 localhost php-cgi: PHP Fatal error: Allowed memory size of 33554432 bytes exhausted [...]
----
Comment by Arteom (arutemus) - Monday, 08 October 2012, 23:28 GMT
Then easy way to solve this just to change memory_limit > 32M
Comment by canyonknight (canyonknight) - Sunday, 14 October 2012, 21:19 GMT
I don't think increasing memory_limit is a full solution to this problem.

A potential solution would be to use a LIMIT clause within the SQL query. Have it limit results to some amount that won't exceed the maximum memory usage. If resultcount equals the limit, have the JSON response be the "error" type with something like "Too many package results".

After some brief memory profiling, I'm betting a query up to 5000 results probably won't exceed 32M. So the search limit probably should be between 0 and 5000.
Comment by Lukas Fleischer (lfleischer) - Monday, 22 October 2012, 10:45 GMT
  • Field changed: Reported Version (1.9.1 → 2.0.0-rc1)

Loading...