title: Google Sheet Error: Service Spreadsheets timed out while accessing document with id
body: <p>I get this error &quot;<strong>Service Spreadsheets timed out while accessing document with id</strong> ...&quot; every time I run a very simple code, in which I am basically copying data from one google sheet to another using <code>getValues()</code> and <code>setValues()</code>.</p>
  <p>I don't think it is because of 5M cells limit, because <strong>the same exact function is working perfectly fine in another Google Sheet</strong> with even bigger size. So I really don't understand where the problem is.</p>
  <p>I have tried to create an empty GS and run the function, so I am only pulling data without any other calculation, but still, it gives me the same error.</p>
  <p>Any idea what the reason could be?</p>
  <p>Here the code as reference:</p>
  <pre><code>   function MyFunction(){
        var pm_ss_0 = SpreadsheetApp.openById('...');
        var pm_tab_0 = pm_ss_0.getSheetByName('...');
        var pm_data_0 = pm_tab_0.getDataRange().getValues();
        var target_ss_0 = SpreadsheetApp.getActiveSpreadsheet();
        var target_tab_0 = target_ss_0.getSheetByName('...');
        target_tab_0.clearContents();
        var target_data_0 = target_tab_0.getRange(1, 1, pm_data_0.length,   
        pm_data_0[0].length).setValues(pm_data_0);
        }
  </code></pre>