Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

linkinghere module: string_output_string is longer than 10Mb #192

Closed
seebi opened this issue Feb 26, 2013 · 5 comments
Closed

linkinghere module: string_output_string is longer than 10Mb #192

seebi opened this issue Feb 26, 2013 · 5 comments
Assignees
Milestone

Comments

@seebi
Copy link
Member

seebi commented Feb 26, 2013

some sparql query in the linking here module is not optimal for large datasets:
SPARQL Error: [unixODBC][OpenLink][Virtuoso iODBC Driver][Virtuoso Server]HT057: The STRING session in string_output_string is longer than 10Mb. Either use substring to access it in parts or place less data in it. () in query: define output:format "JSON" SELECT DISTINCT ?subject ?uri FROM http://leipzig-data.de/Data/Adressen/ WHERE { ?subject ?uri http://leipzig-data.de/Data/Model/Adresse . }

as seen here: http://leipzig-data.de/Data/resource/properties?r=http%3A%2F%2Fleipzig-data.de%2FData%2FModel%2FAdresse

@ghost ghost assigned white-gecko Feb 26, 2013
@seebi
Copy link
Member Author

seebi commented Feb 26, 2013

maybe we limit the query to 6? (more is not shown here)

@white-gecko
Copy link
Member

If I understand you right you suggest the following patch:

--- a/extensions/resourcemodules/LinkinghereModule.php
+++ b/extensions/resourcemodules/LinkinghereModule.php
@@ -33,7 +33,7 @@ class LinkinghereModule extends OntoWiki_Module
                 'WHERE {
                     ?subject ?uri <' . (string)$this->_owApp->selectedResource . '> .
                 }'
-            );
+            )->setLimit(6);

         $result           = $this->_owApp->selectedModel->sparqlQuery($query, array('result_format' => 'extended'));
         $_predicatesResult = array();

I can't test it locally because the exports ends with the following exception:

SPARQL Error: [unixODBC][OpenLink][Virtuoso iODBC Driver][Virtuoso Server]SR353: Sorted TOP clause specifies more then 11000 rows to sort. Only 10000 are allowed. Either decrease the offset and/or row count or use a scrollable cursor () in query: …

It seams that we have more scaling problems :-(

@seebi
Copy link
Member Author

seebi commented Mar 4, 2013

@hgg: please upgrade your installation and report success or fail ...

@cfrancois7
Copy link

cfrancois7 commented Mar 28, 2017

Hello.

I got the same error than you with the last version.

SELECT ?s ?p
FROM <http://www.ecoinvent.org/2013/ecospold#>
WHERE{?s ?p <http://www.ecoinvent.org/2013/ecospold#flowType> . }  -> 

/usr/local/var/www/htdocs/vendor/aksw/erfurt/library/Erfurt/Store/Adapter/Virtuoso.php@1058
2017-03-28T08:52:18+02:00 EMERG (0): Erfurt_Store_Adapter_Exception: 
SPARQL Error: [OpenLink][Virtuoso iODBC Driver][Virtuoso Server]HT057:
The STRING session in string_output_string is longer than 10Mb.
Either use substring to access it in parts or place less data in it.
() on querying graph <NULL> with query: define output:format "JSON"

While the limit is set in the linkingheremodule:

$query->setSelectClause('SELECT DISTINCT ?subject ?uri')
            ->setWherePart(
                'WHERE {
                    ?subject ?uri <' . (string)$this->_owApp->selectedResource . '> .
                }'
            )->setLimit(6);

@cfrancois7
Copy link

cfrancois7 commented Mar 28, 2017

I found something else related to this error:

[Tue Mar 28 09:19:29.118377 2017] [:error] [pid 7715] [client ::1:54873] PHP Fatal error: Maximum execution time of 300 seconds exceeded in /usr/local/var/www/htdocs/vendor/aksw/erfurt/library/Erfurt/Rdf/MemoryModel.php on line 382, referer: http://localhost/index.php/resource/properties/?r=http%3A%2F%2Fwww.ecoinvent.org%2F2013%2Fecospold%23flowType%2FreferenceProduct

This node referenceProduct is a very linked instance, a kind of super-identifier of thousands other nodes.

I got the same error with another similar type of instance :

Fatal error: Maximum execution time of 300 seconds exceeded in /usr/local/var/www/htdocs/vendor/aksw/erfurt/library/Erfurt/Rdf/MemoryModel.php on line 382

The error appears when I load an instance that is linked to a such "very linked" instance.
How is possible to limit the loading of data?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants