MEC servers (MESs) support multiple queues to accommodate the delay requirements of tasks offloaded from end devices or transferred from other MESs. The service time assigned to each queue trades off the queue backlog and energy consumption. Because multiple queues share the computational resources of a MES, optimally scheduling the service time among them is important, reducing the energy consumption of a MES and ensuring the delay requirement of each queue. To achieve a balance between these metrics, we propose an online service-time allocation method that minimizes the average energy consumption and satisfies the average queue backlog constraint. We employ the Lyapunov optimization framework to transform the time-averaged optimization problem into a per-time-slot optimization problem and devise an online service-time allocation method whose time complexity is linear to the number of queues. This method determines the service time for each queue at the beginning of each time slot using the observed queue length and expected workload. We adopt a long short-term memory (LSTM) deep learning model to predict the workload that will be imposed on each queue during a time slot. Using simulation studies, we verify that the proposed method strikes a better balance between energy consumption and queuing delay than conventional methods.