Imgetting an error with google sitemaps generation that appears to be to do with urls.

2008 MySQL client ran out of memory
in:
[ SELECT uri FROM ceon_uri_mappings WHERE main_page = 'product_info' AND associated_db_id = '1294' AND language_id = '1' AND current_uri = '1' LIMIT 1;]
2013 Lost connection to MySQL server during query
in:
[select count(*) as total from sessions where sesskey = '1ca2fbd7dc8c2849bf4b6788953ada29']