How do I avoid seeing an InternalError message whe...
# troubleshooting
t
How do I avoid seeing an InternalError message when I would like to result a very very large result set?
image.png
When I do limit 10000 I do not see any error, but when I increase the limit to 100000 I see the above.
y
can you check the broker logs ?
t
i only see warn messages
n
look for exceptions in the controller log too
also what are the warn you see?
t
Copy code
2020/09/29 19:06:16.333 ERROR [PinotQueryResource] [grizzly-http-server-1] Caught exception while sending query request
java.io.IOException: Failed : HTTP error code : 500
        at org.apache.pinot.controller.api.resources.PinotQueryResource.sendPostRaw(PinotQueryResource.java:284) ~[pinot-all-0.5.0-SNAPSHOT-jar-with-dependencies.jar:0.5.0-SNAPSHOT-8511410b9b93616642c94ae11fc072444555962b]
        at org.apache.pinot.controller.api.resources.PinotQueryResource.sendRequestRaw(PinotQueryResource.java:322) ~[pinot-all-0.5.0-SNAPSHOT-jar-with-dependencies.jar:0.5.0-SNAPSHOT-8511410b9b93616642c94ae11fc072444555962b]
        at org.apache.pinot.controller.api.resources.PinotQueryResource.getQueryResponse(PinotQueryResource.java:204) ~[pinot-all-0.5.0-SNAPSHOT-jar-with-dependencies.jar:0.5.0-SNAPSHOT-8511410b9b93616642c94ae11fc072444555962b]
        at org.apache.pinot.controller.api.resources.PinotQueryResource.handlePostSql(PinotQueryResource.java:131) ~[pinot-all-0.5.0-SNAPSHOT-jar-with-dependencies.jar:0.5.0-SNAPSHOT-8511410b9b93616642c94ae11fc072444555962b]
        at sun.reflect.GeneratedMethodAccessor50.invoke(Unknown Source) ~[?:?]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_265]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_265]
        at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory.lambda$static$0(ResourceMethodInvocationHandlerFactory.java:52) ~[pinot-all-0.5.0-SNAPSHOT-jar-with-dependencies.jar:0.5.0-SNAPSHOT-8511410b9b93616642c94ae11fc072444555962b]
        at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:124) [pinot-all-0.5.0-SNAPSHOT-jar-with-dependencies.jar:0.5.0-SNAPSHOT-8511410b9b93616642c94ae11fc072444555962b]
        at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:167) [pinot-all-0.5.0-SNAPSHOT-jar-with-dependencies.jar:0.5.0-SNAPSHOT-8511410b9b93616642c94ae11fc072444555962b]
        at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$TypeOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:219) [pinot-all-0.5.0-SNAPSHOT-jar-with-dependencies.jar:0.5.0-SNAPSHOT-8511410b9b93616642c94ae11fc072444555962b]
        at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:79) [pinot-all-0.5.0-SNAPSHOT-jar-with-dependencies.jar:0.5.0-SNAPSHOT-8511410b9b93616642c94ae11fc072444555962b]
        at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:469) [pinot-all-0.5.0-SNAPSHOT-jar-with-dependencies.jar:0.5.0-SNAPSHOT-8511410b9b93616642c94ae11fc072444555962b]
        at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:391) [pinot-all-0.5.0-SNAPSHOT-jar-with-dependencies.jar:0.5.0-SNAPSHOT-8511410b9b93616642c94ae11fc072444555962b]
        at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:80) [pinot-all-0.5.0-SNAPSHOT-jar-with-dependencies.jar:0.5.0-SNAPSHOT-8511410b9b93616642c94ae11fc072444555962b]
        at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:253) [pinot-all-0.5.0-SNAPSHOT-jar-with-dependencies.jar:0.5.0-SNAPSHOT-8511410b9b93616642c94ae11fc072444555962b]
        at org.glassfish.jersey.internal.Errors$1.call(Errors.java:248) [pinot-all-0.5.0-SNAPSHOT-jar-with-dependencies.jar:0.5.0-SNAPSHOT-8511410b9b93616642c94ae11fc072444555962b]
        at org.glassfish.jersey.internal.Errors$1.call(Errors.java:244) [pinot-all-0.5.0-SNAPSHOT-jar-with-dependencies.jar:0.5.0-SNAPSHOT-8511410b9b93616642c94ae11fc072444555962b]
        at org.glassfish.jersey.internal.Errors.process(Errors.java:292) [pinot-all-0.5.0-SNAPSHOT-jar-with-dependencies.jar:0.5.0-SNAPSHOT-8511410b9b93616642c94ae11fc072444555962b]
        at org.glassfish.jersey.internal.Errors.process(Errors.java:274) [pinot-all-0.5.0-SNAPSHOT-jar-with-dependencies.jar:0.5.0-SNAPSHOT-8511410b9b93616642c94ae11fc072444555962b]
        at org.glassfish.jersey.internal.Errors.process(Errors.java:244) [pinot-all-0.5.0-SNAPSHOT-jar-with-dependencies.jar:0.5.0-SNAPSHOT-8511410b9b93616642c94ae11fc072444555962b]
        at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:265) [pinot-all-0.5.0-SNAPSHOT-jar-with-dependencies.jar:0.5.0-SNAPSHOT-8511410b9b93616642c94ae11fc072444555962b]
        at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:232) [pinot-all-0.5.0-SNAPSHOT-jar-with-dependencies.jar:0.5.0-SNAPSHOT-8511410b9b93616642c94ae11fc072444555962b]
        at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:679) [pinot-all-0.5.0-SNAPSHOT-jar-with-dependencies.jar:0.5.0-SNAPSHOT-8511410b9b93616642c94ae11fc072444555962b]
        at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:353) [pinot-all-0.5.0-SNAPSHOT-jar-with-dependencies.jar:0.5.0-SNAPSHOT-8511410b9b93616642c94ae11fc072444555962b]
        at org.glassfish.grizzly.http.server.HttpHandler$1.run(HttpHandler.java:200) [pinot-all-0.5.0-SNAPSHOT-jar-with-dependencies.jar:0.5.0-SNAPSHOT-8511410b9b93616642c94ae11fc072444555962b]
        at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:569) [pinot-all-0.5.0-SNAPSHOT-jar-with-dependencies.jar:0.5.0-SNAPSHOT-8511410b9b93616642c94ae11fc072444555962b]
        at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:549) [pinot-all-0.5.0-SNAPSHOT-jar-with-dependencies.jar:0.5.0-SNAPSHOT-8511410b9b93616642c94ae11fc072444555962b]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_265]
the warn is for a missing segment
Copy code
2020/09/29 18:59:54.006 WARN [BaseInstanceSelector] [ClusterChangeHandlingThread] Failed to find servers hosting segment: sesame_person_features__3__202__20200918T0626Z for table: sesame_person_features_REALTIME (all ONLINE/CONSUMING instances: [] and OFFLINE instances: [] are disabled, counting segment as unavailable)
n
how about exceptions on the server?
t
i don’t see any exceptions on the servers
i tried adjusting timeout settings in the broker and servers and it did not help
y
I think it is Memory issue.
t
give the server nodes more memory?
n
you should’ve seen OutOfMemory errors on the servers though. Simply not working with absolutely no message is quite strange, unless the servers are already dead from OOM
what is the jvm settings for servers currently? are the servers SSD nodes?
t
Copy code
JAVA_OPTS:  -Xms512M -Xmx1G -Dlog4j2.configurationFile=/opt/pinot/conf/pinot-server-log4j2.xml -Dplugins.dir=/opt/pinot/plugins
Copy code
Provisioner:           <http://kubernetes.io/gce-pd|kubernetes.io/gce-pd>
Parameters:            type=pd-standard
i believe that means they’re not ssd?
n
1G does seem low for a high workload. No definitive way to tell yet, as to how much it should be. But please try increasing (4G if available) maybe it’ll help
t
ok. i will try that. thank you.
darn. still same issue.
Copy code
2020/09/30 06:33:05.663 ERROR [PinotQueryResource] [grizzly-http-server-1] Caught exception in sendQueryRaw
java.io.IOException: Failed : HTTP error code : 500
i don’t see errors in the server logs
n
do you see any logs which tell the server acknowledged the query?
t
i don’t actually see such a thing in the server logs
i just ran a query with no errors and don’t see anything in the server logs nor controller logs to acknowledge that
y
I think I have faced the same issue. instead of querying using the ui, can you directly query the pinot broker using the sql endpoint ?
t
Copy code
File "/Users/tchan/Workspace/gbo-pinot/.venv/lib/python3.7/site-packages/pinotdb/db.py", line 279, in execute
    ) from e
pinotdb.exceptions.DatabaseError: Error when querying 
select sensor_id,
       time_stamp,
       annotations_json_str
  from sesame_person_features
 where time_stamp between 1601055847025 and 1601056747025

 order by time_stamp, sensor_id asc
 limit 56754 from <http://34.69.77.31:8099/query/sql>, raw response is:
<html><head><title>Grizzly 2.4.4</title><style><!--div.header {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#003300;font-size:22px;-moz-border-radius-topleft: 10px;border-top-left-radius: 10px;-moz-border-radius-topright: 10px;border-top-right-radius: 10px;padding-left: 5px}div.body {font-family:Tahoma,Arial,sans-serif;color:black;background-color:#FFFFCC;font-size:16px;padding-top:10px;padding-bottom:10px;padding-left:10px}div.footer {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#666633;font-size:14px;-moz-border-radius-bottomleft: 10px;border-bottom-left-radius: 10px;-moz-border-radius-bottomright: 10px;border-bottom-right-radius: 10px;padding-left: 5px}BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;}B {font-family:Tahoma,Arial,sans-serif;color:black;}A {color : black;}HR {color : #999966;}--></style> </head><body><div class="header">Request failed.</div><div class="body">Request failed.</div><div class="footer">Grizzly 2.4.4</div></body></html>
i am using the pinotdb python library to run the same query
j
I cannot reproduce the issue on my local box with query:
select * from mytable order by AirTime limit 1000000
What is the content in
annotations_json_str
? Could that be large?
t
yes. very very large
we are storing highly nested json blob in that column
i just looked at one blob and it was 3.6k
j
I feel the problem is triggered by sending back huge response, trying to figure out where it throws exception
t
yes. doing a count(*) with the same query never has an error.
j
Can you try this query (removing
annotations_json_str
)
Copy code
select sensor_id,
       time_stamp
  from sesame_person_features
 where time_stamp between 1601055847025 and 1601056747025
order by time_stamp, sensor_id asc
limit 10000
I think it should also work
Can you check all the logs from the broker when you send the query? If you have multiple brokers, it might appear on any of them
t
Copy code
select sensor_id,
       time_stamp
  from sesame_person_features
 where time_stamp between 1601055847025 and 1601056747025
order by time_stamp, sensor_id asc
limit 56754
this runs fast and without errors
j
Yeah, then the problem is from the huge json string column. Can you please try to find the query log from the broker? The exception should also be logged there
t
i’m looking in the broker logs and do not see the error