Guest Posted October 7, 2016 Share Posted October 7, 2016 Hello allI have Presta, and I like it but.. Now I get this strange error: Bad SQL query Disk full (/tmp/#sql_58f_0); waiting for someone to free some space... I googled a lot, but did not find any solution. After I added EAN codes in my products field, my shop shows " No featured products at this time.Prior to this all seemed to look fine.I restored an old backup (from 2 months ago) and noticed that it already did had the same SQL error and after I added one EAN code, I see the same "no featured products" Not sure if the restore placed the shop back in 100 old condition, but with ean code's I have a total non working shop.Even removing them dos not solve my problem. I turned on debugging and received this as result: {PrestaShopDatabaseException] Disk full (/tmp/#sql_58f_0); waiting for someone to free some space... SELECT a.`id_category`, `name`, `description`, sa.`position` AS `position`, `active` , sa.position position FROM `ps_category` a LEFT JOIN `ps_category_lang` b ON (b.`id_category` = a.`id_category` AND b.`id_lang` = 1 AND b.`id_shop` = 1) LEFT JOIN `ps_category_shop` sa ON (a.`id_category` = sa.`id_category` AND sa.id_shop = 1) WHERE 1 AND `id_parent` = 2 ORDER BY sa.`position` ASC LIMIT 0, 50 ******************************************************************************************* at line 791 in file classes/db/Db.php 786. if ($webservice_call && $errno) { 787. $dbg = debug_backtrace(); 788. WebserviceRequest::getInstance()->setError(500, ' '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);789. } elseif (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS')) {790. if ($sql) {791. throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');792. }793. 794. throw new PrestaShopDatabaseException($this->getMsgError());795. }796. }********************************************************************************************DbCore->displayError - [line 425 - classes/db/Db.php] - [1 Arguments] 420. $this->result = $this->_query($sql);421. }422. }423. 424. if (_PS_DEBUG_SQL_) {425. $this->displayError($sql);426. }427. 428. return $this->result;429. }430. ********************************************************************************************DbCore->query - [line 643 - classes/db/Db.php] - [1 Arguments] Argument [0]SELECTa.`id_category`, `name`, `description`, sa.`position` AS `position`, `active`, sa.position positionFROM `ps_category` a LEFT JOIN `ps_category_lang` b ON (b.`id_category` = a.`id_category` AND b.`id_lang` = 1 AND b.`id_shop` = 1)LEFT JOIN `ps_category_shop` sa ON (a.`id_category` = sa.`id_category` AND sa.id_shop = 1) WHERE 1 AND `id_parent` = 2 ORDER BY sa.`position` ASC LIMIT 0, 50********************************************************************************************DbCore->executeS - [line 3212 - classes/controller/AdminController.php] - [3 Arguments] 3207. '.($this->_tmpTableFilter ? ' * FROM (SELECT ' : '').$this->_listsql.$sql_from.$sql_join.' WHERE 1 '.$sql_where.3208. $sql_order_by.$sql_limit;3209. $list_count = 'SELECT COUNT(*) AS `'._DB_PREFIX_.$this->table.'` '.$sql_from.$sql_join.' WHERE 1 '.$sql_where;3210. }3211. 3212. $this->_list = Db::getInstance()->executeS($this->_listsql, true, false);3213. 3214. if ($this->_list === false) {3215. $this->_list_error = Db::getInstance()->getMsgError();3216. break;3217. }********************************************************************************************AdminControllerCore->getList - [line 253 - controllers/admin/AdminCategoriesController.php] - [6 Arguments] 248. return parent::renderList();249. }250. 251. public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = null, $id_lang_shop = false)252. {253. parent::getList($id_lang, $order_by, $order_way, $start, $limit, Context::getContext()->shop->id);254. // Check each row to see if there are combinations and get the correct action in consequence255. 256. $nb_items = count($this->_list);257. for ($i = 0; $i < $nb_items; $i++) {258. $item = &$this->_list[$i];********************************************************************************************AdminCategoriesControllerCore->getList - [line 2333 - classes/controller/AdminController.php] - [1 Arguments] Argument [0]1********************************************************************************************AdminControllerCore->renderList - [line 248 - controllers/admin/AdminCategoriesController.php] 243. $this->tpl_list_vars['delete_category'] = true;244. $this->tpl_list_vars['REQUEST_URI'] = $_SERVER['REQUEST_URI'];245. $this->tpl_list_vars['POST'] = $_POST;246. }247. 248. return parent::renderList();249. }250. 251. public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = null, $id_lang_shop = false)252. {253. parent::getList($id_lang, $order_by, $order_way, $start, $limit, Context::getContext()->shop->id);********************************************************************************************AdminCategoriesControllerCore->renderList - [line 2034 - classes/controller/AdminController.php] 2029. } elseif ($this->display == 'details') {2030. $this->content .= $this->renderDetails();2031. } elseif (!$this->ajax) {2032. $this->content .= $this->renderModulesList();2033. $this->content .= $this->renderKpis();2034. $this->content .= $this->renderList();2035. $this->content .= $this->renderOptions();2036. 2037. // if we have to display the required fields form2038. if ($this->required_database) {2039. $this->content .= $this->displayRequiredFields();********************************************************************************************AdminControllerCore->initContent - [line 199 - controllers/admin/AdminCategoriesController.php] 194. 'url_delete' => htmlentities($_SERVER['REQUEST_URI']),195. 'boxes' => $this->boxes,196. ));197. }198. 199. parent::initContent();200. }201. 202. public function setMedia()203. {204. parent::setMedia();********************************************************************************************AdminCategoriesControllerCore->initContent - [line 189 - classes/controller/Controller.php] 184. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) {185. $this->initHeader();186. }187. 188. if ($this->viewAccess()) {189. $this->initContent();190. } else {191. $this->errors[] = Tools::displayError('Access denied.');192. }193. 194. if (!$this->content_only && ($this->display_footer || (isset($this->className) && $this->className))) {********************************************************************************************ControllerCore->run - [line 367 - classes/Dispatcher.php] 362. if (isset($params_hook_action_dispatcher)) {363. Hook::exec('actionDispatcher', $params_hook_action_dispatcher);364. }365. 366. // Running controller367. $controller->run();368. } catch (PrestaShopException $e) {369. $e->displayMessage();370. }371. }372. ********************************************************************************************DispatcherCore->dispatch - [line 58 - admin/index.php] 53. if (!isset($_REQUEST['controller']) && isset($_REQUEST['tab'])) {54. $_REQUEST['controller'] = strtolower($_REQUEST['tab']);55. }56. 57. // Prepare and trigger admin dispatcher 58. Dispatcher::getInstance()->dispatch(); Google isn't much help. Have you seen this before, and how can I (or someone else) fix this? Thank you for feedback! p.s. the domain is Giantjeans.com Link to comment Share on other sites More sharing options...
selectshop.at Posted October 7, 2016 Share Posted October 7, 2016 The error is very simply to specify. On your wehosting package the webdisk space (in this case the database size) is restricted or the SQL-server is having too many requests to the database at same time (overlaod on bad configured servers). This means, that Prestashop cannot write the data. Which one of both possibilities it is, have to be read by provider from server error logs and fix them. But I suggest you (cause I think the problem is the second - shared, bad configured server) best you move to another provider. Link to comment Share on other sites More sharing options...
tuk66 Posted October 7, 2016 Share Posted October 7, 2016 I would remove records from some non-essential tables, like ps_connections and others. Then you have to compact the database. Link to comment Share on other sites More sharing options...
selectshop.at Posted October 7, 2016 Share Posted October 7, 2016 I would remove records from some non-essential tables, like ps_connections and others. Then you have to compact the database. It's a for now solution, but not on long last term. Because the ground problem is not eliminated by this. Link to comment Share on other sites More sharing options...
Guest Posted October 7, 2016 Share Posted October 7, 2016 (edited) Thank you for your replies. How do I compact the database? Via phpmyadmin? https://www.siteground.com/tutorials/phpmyadmin/phpmyadmin_optimize_database.htm I followed their steps for repair and optimise. I am my own database provider, as I'm running on a VPS. This VPS does seem to have one problem, that the tmp is placed on a separate partition of only 1 GB.On the root I have 48GB free.... But, my knowledge is to limited to transfer a tmp partition.So I guess I first need to compact / clean on some way Edited October 7, 2016 by Guest (see edit history) Link to comment Share on other sites More sharing options...
Guest Posted October 7, 2016 Share Posted October 7, 2016 Sofar no luck. If I look at DA CMD_ADMIN_STATS Filesystem Size Used Avail Use% Mounted on /dev/mapper/vg_directadmin-lv_root 48G 4.4G 44G 10% / /dev/mapper/vg_directadmin-lv_tmp 1014M 1014M 20K 100% /tmp /dev/vda1 497M 257M 241M 52% /boot devtmpfs 487M 0 487M 0% /dev tmpfs 497M 24K 497M 1% /dev/shm tmpfs 497M 6.7M 490M 2% /run tmpfs 497M 0 497M 0% /sys/fs/cgroup tmpfs 100M 0 100M 0% /run/user/0 As you can see, tmp is 100% in use. How do I clean this? Link to comment Share on other sites More sharing options...
selectshop.at Posted October 8, 2016 Share Posted October 8, 2016 You asked me by PM, and this is my answer: perhaps this tutorial serves you: http://stackoverflow...folder-of-mysql BTW, your problem is not a bug, but a bad configured server. Sometimes it is better to let Linux install by itself, specially if you ar on VPS, cause there is no need to change standard values in this case. Error logs on server also read ? Link to comment Share on other sites More sharing options...
TiaNex Shopping Posted October 19, 2016 Share Posted October 19, 2016 it maybe caused by 100% /tmp /dev/mapper/vg_directadmin-lv_tmp 1014M 1014M 20K 100% /tmp please free /tmp and try again Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now