You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2019/08/04 07:31:25 UTC

[GitHub] [incubator-shardingsphere] jimmycheng888 edited a comment on issue #2774: OutOfMemoryError caused by excessive pagination

jimmycheng888 edited a comment on issue #2774: OutOfMemoryError caused by excessive pagination
URL: https://github.com/apache/incubator-shardingsphere/issues/2774#issuecomment-517980989
 
 
   > Will close soon if no response anymore.
   
   
   The extra logs are the same. I hope the author can solve this bug as soon as possible, because I think it is a few bugs that are easy to reproduce. I and my friends around me say that it is a bug in sharding-jdbc. In fact, mycat also has such a bug, the reason is also because of the sorting problem, please refer to https://blog.csdn.net/u013235478/article/details/53178657 for details.
   However, I think there is a way to solve this problem. For example, first pass the total number of couns, then calculate the offset, and then rewrite sql. It can also solve the non-ID fragmentation, but sharding-jdbc does not. Provide such a function.
   
   ```
   .....
   2019-08-04 15:13:31.387 [http-nio-8210-exec-9] INFO  ShardingSphere-SQL - Actual SQL: user_1 ::: SELECT
           *
           FROM t_user_97 as u
           WHERE 1=1
           AND insert_time  >=?
            AND insert_time <=?
           ORDER BY id desc
               limit ? offset ? ::: [[2019-01-27T00:00:00.000+0800, 2019-08-04T23:59:59.000+0800, 852760, 0]]
   2019-08-04 15:13:31.387 [http-nio-8210-exec-9] INFO  ShardingSphere-SQL - Actual SQL: user_1 ::: SELECT
           *
           FROM t_user_98 as u
           WHERE 1=1
           AND insert_time  >=?
            AND insert_time <=?
           ORDER BY id desc
               limit ? offset ? ::: [[2019-01-27T00:00:00.000+0800, 2019-08-04T23:59:59.000+0800, 852760, 0]]
   2019-08-04 15:13:31.387 [http-nio-8210-exec-9] INFO  ShardingSphere-SQL - Actual SQL: user_1 ::: SELECT
          *
           WHERE 1=1
           AND insert_time  >=?
            AND insert_time <=?
           ORDER BY id desc
               limit ? offset ? ::: [[2019-01-27T00:00:00.000+0800, 2019-08-04T23:59:59.000+0800, 852760, 0]]
   2019-08-04 15:13:31.387 [http-nio-8210-exec-9] INFO  ShardingSphere-SQL - Actual SQL: user_1 ::: SELECT
           *
           FROM t_user_100 as u
           WHERE 1=1
            AND insert_time  >=?
            AND insert_time <=?
           ORDER BY id desc
               limit ? offset ? ::: [[2019-01-27T00:00:00.000+0800, 2019-08-04T23:59:59.000+0800, 852760, 0]]
   Exception in thread "http-nio-8210-ClientPoller-1" Exception in thread "NettyClientWorkerThread_2" Exception in thread "recoverScheduler_QuartzSchedulerThread" Exception in thread "AsyncAppender-Dispatcher-Thread-25" Exception in thread "MQ-AsyncTraceDispatcher-Thread-be9e7518-bf87-4d9b-93f7-a42668e86cfc" Exception in thread "Catalina-utility-1" java.lang.OutOfMemoryError: GC overhead limit exceeded
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services